Changeset: 2c5b48ca9cf0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2c5b48ca9cf0
Modified Files:
Branch: default
Log Message:
Mergin
diffs (44 lines):
diff -r 326be0366106 -r 2c5b48ca9cf0 sql/src/backends/monet5/sql_scenario.mx
--- a/sql/src/backends/monet5/sql_scenario.mx Sat Dec 18 10:07:22 2010 +0100
+++ b/sql/src/backends/monet5/sql_scenario.mx Sat Dec 18 10:13:20 2010 +0100
@@ -597,10 +597,11 @@
}
/* #define _SQL_COMPILE */
-...@-
-BEWARE, the SQLstatementIntern turns off the autocommit mode.
-It is contrary to normal behavior.
-...@c
+
+/*
+BEWARE: SQLstatementIntern only commits after all statements found
+in expr are executed, when autocommit mode is enabled.
+*/
str
SQLstatementIntern(Client c, str *expr, str nme, int execute, bit output)
{
diff -r 326be0366106 -r 2c5b48ca9cf0 sql/src/sql/skyserver.sql
--- a/sql/src/sql/skyserver.sql Sat Dec 18 10:07:22 2010 +0100
+++ b/sql/src/sql/skyserver.sql Sat Dec 18 10:13:20 2010 +0100
@@ -19,11 +19,16 @@
BEGIN
DECLARE res varchar(32), aux varchar(32);
DECLARE ofset int;
- SET ofset = 0;
- SET res = SUBSTRING(s1,ofset,st-1);
- SET res = res || s3;
- SET ofset = LENGTH(s1)-len;
- SET aux = SUBSTRING(s1,ofset, len);
+
+ IF ( st < 0 or st > LENGTH(s1))
+ THEN RETURN '';
+ END IF;
+
+ SET ofset = 1;
+ SET res = SUBSTRING(s1,ofset,st-1);
+ SET res = res || s3;
+ SET ofset = st + len;
+ SET aux = SUBSTRING(s1,ofset,LENGTH(s1)-ofset+1);
SET res = res || aux;
RETURN res;
END;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list