Changeset: 63ea2763491e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63ea2763491e
Modified Files:
        sql/backends/monet5/sql_scenario.c
Branch: Dec2011
Log Message:

When upgrading the database, add filter functions to list of system functions.


diffs (16 lines):

diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -401,10 +401,11 @@ sql_update_dec2011( Client c, mvc *m )
                        }
                }
        }
-       if (bufsize < pos + 256)
+       if (bufsize < pos + 400)
                buf = GDKrealloc(buf, bufsize += 1024);
        pos += snprintf(buf+pos, bufsize-pos, "create filter function 
sys.\"like\"(val string, pat string, esc string) external name 
pcre.like_filter;\n");
        pos += snprintf(buf+pos, bufsize-pos, "create filter function 
sys.\"ilike\"(val string, pat string, esc string) external name 
pcre.ilike_filter;\n");
+       pos += snprintf(buf + pos, "insert into sys.systemfunctions (select 
f.id from sys.functions f, sys.schemas s where f.name in ('ilike', 'like') and 
f.type = %d and f.schema_id = s.id and s.name = 'sys');\n", F_FILT)
        printf("Running database upgrade commands:\n%s\n", buf);
        err = SQLstatementIntern(c, &buf, "update", 1, 0);
        GDKfree(buf);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to