Changeset: 559c4a06308d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=559c4a06308d
Modified Files:
monetdb5/optimizer/opt_inline.c
sql/test/BugTracker-2017/Tests/exist-bigint-missing.Bug-6315.stable.out
Branch: default
Log Message:
Avoid infinite recursion.
diffs (56 lines):
diff --git a/monetdb5/optimizer/opt_inline.c b/monetdb5/optimizer/opt_inline.c
--- a/monetdb5/optimizer/opt_inline.c
+++ b/monetdb5/optimizer/opt_inline.c
@@ -9,7 +9,7 @@
#include "monetdb_config.h"
#include "opt_inline.h"
-static int
+static bool
isCorrectInline(MalBlkPtr mb){
/* make sure we have a simple inline function with a singe return */
InstrPtr p;
@@ -25,14 +25,16 @@ isCorrectInline(MalBlkPtr mb){
}
-static int OPTinlineMultiplex(Client cntxt, MalBlkPtr mb, InstrPtr p){
+static bool OPTinlineMultiplex(Client cntxt, MalBlkPtr mb, InstrPtr p){
Symbol s;
str mod,fcn;
mod = VALget(&getVar(mb, getArg(p, 1))->value);
fcn = VALget(&getVar(mb, getArg(p, 2))->value);
if( (s= findSymbol(cntxt->usermodule, mod,fcn)) ==0 )
- return FALSE;
+ return false;
+ if (s->def == mb) /* avoid infinite recursion */
+ return false;
/*
* Before we decide to propagate the inline request
* to the multiplex operation, we check some basic properties
diff --git
a/sql/test/BugTracker-2017/Tests/exist-bigint-missing.Bug-6315.stable.out
b/sql/test/BugTracker-2017/Tests/exist-bigint-missing.Bug-6315.stable.out
--- a/sql/test/BugTracker-2017/Tests/exist-bigint-missing.Bug-6315.stable.out
+++ b/sql/test/BugTracker-2017/Tests/exist-bigint-missing.Bug-6315.stable.out
@@ -30,8 +30,8 @@ Ready.
# else (false)
# end
#from sys.table_types limit 3;
-% .L72 # table_name
-% L72 # name
+% sys.L37 # table_name
+% L37 # name
% boolean # type
% 5 # length
[ false ]
@@ -43,8 +43,8 @@ Ready.
# else (false)
# end
#from sys.table_types limit 3;
-% .L72 # table_name
-% L72 # name
+% sys.L40 # table_name
+% L40 # name
% boolean # type
% 5 # length
[ true ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list