Changeset: 7a84fbd34c80 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a84fbd34c80
Modified Files:
sql/server/rel_optimizer.c
tools/monetdbe/monetdbe.c
Branch: unlock
Log Message:
merged with default
diffs (129 lines):
diff --git a/sql/jdbc/tests/Tests/All b/sql/jdbc/tests/Tests/All
--- a/sql/jdbc/tests/Tests/All
+++ b/sql/jdbc/tests/Tests/All
@@ -14,7 +14,6 @@ HAVE_JDBCTESTS?BugDecimalRound_Bug_3561
HAVE_JDBCTESTS?BugResultSetMetaData_Bug_6183
HAVE_JDBCTESTS?Bug_PrepStmtSetObject_CLOB_6349
HAVE_JDBCTESTS?Bug_Connect_as_voc_getMetaData_Failure_Bug_6388
-HAVE_JDBCTESTS?Bug_PrepStmtSetString_6382
HAVE_JDBCTESTS?Bug_LargeQueries_6571_6693
HAVE_JDBCTESTS?Bug_IsValid_Timeout_Bug_6782
HAVE_JDBCTESTS?Bug_PrepStmt_With_Errors_Jira292
diff --git a/sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.bat
b/sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.bat
deleted file mode 100755
--- a/sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.bat
+++ /dev/null
@@ -1,1 +0,0 @@
-@call "%TSTSRCDIR%\Test.SQL.bat" %*
diff --git a/sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.sh
b/sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.sh
deleted file mode 100755
--- a/sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-$TSTSRCDIR/Test.SQL.sh $*
diff --git a/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.bat
b/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.bat
--- a/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.bat
+++ b/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.bat
@@ -5,11 +5,11 @@ echo password=monetdb>> .monetdb
prompt # $t $g
-java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%"
--help
+java org.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" --help
-java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -f
"%TSTSRCBASE%\%TSTDIR%\Tests\JdbcClient_create_tables.sql"
-java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -f
"%TSTSRCBASE%\%TSTDIR%\Tests\JdbcClient_inserts_selects.sql"
-java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -D
-java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -f
"%TSTSRCBASE%\%TSTDIR%\Tests\JdbcClient_drop_tables.sql"
+java org.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -f
"%TSTSRCBASE%\%TSTDIR%\Tests\JdbcClient_create_tables.sql"
+java org.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -f
"%TSTSRCBASE%\%TSTDIR%\Tests\JdbcClient_inserts_selects.sql"
+java org.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -D
+java org.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d "%TSTDB%" -f
"%TSTSRCBASE%\%TSTDIR%\Tests\JdbcClient_drop_tables.sql"
@del .monetdb
diff --git a/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.bat
b/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.bat
--- a/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.bat
+++ b/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.bat
@@ -5,6 +5,6 @@ echo password=monetdb>> .monetdb
prompt # $t $g
-call java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d %TSTDB%
-e -f "%TSTSRCBASE%\%TSTDIR%\Tests\ValidateSystemCatalogTables.sql"
+call java org.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d %TSTDB% -e
-f "%TSTSRCBASE%\%TSTDIR%\Tests\ValidateSystemCatalogTables.sql"
@del .monetdb
diff --git a/sql/jdbc/tests/Tests/bogus-auto-generated-keys.SQL.bat
b/sql/jdbc/tests/Tests/bogus-auto-generated-keys.SQL.bat
--- a/sql/jdbc/tests/Tests/bogus-auto-generated-keys.SQL.bat
+++ b/sql/jdbc/tests/Tests/bogus-auto-generated-keys.SQL.bat
@@ -5,6 +5,6 @@ echo password=monetdb>> .monetdb
prompt # $t $g
-call java nl.cwi.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d %TSTDB%
-e -f "%TSTSRCBASE%\%TSTDIR%\Tests\bogus-auto-generated-keys.sql"
+call java org.monetdb.client.JdbcClient -h %HOST% -p %MAPIPORT% -d %TSTDB% -e
-f "%TSTSRCBASE%\%TSTDIR%\Tests\bogus-auto-generated-keys.sql"
@del .monetdb
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -9611,13 +9611,12 @@ optimize_rel(mvc *sql, sql_rel *rel, int
rel = rel_visitor_bottomup(&v, rel,
&rel_simplify_math);
if (gp.cnt[op_groupby])
rel = rel_visitor_bottomup(&v, rel,
&rel_distinct_aggregate_on_unique_values);
+ if (gp.cnt[op_left] || gp.cnt[op_right] ||
gp.cnt[op_full] || gp.cnt[op_join] || gp.cnt[op_semi] || gp.cnt[op_anti])
+ rel = rel_visitor_bottomup(&v, rel,
&rel_remove_redundant_join);
rel = rel_visitor_bottomup(&v, rel,
&rel_distinct_project2groupby);
}
}
- if (level <= 0 && (gp.cnt[op_left] || gp.cnt[op_right] ||
gp.cnt[op_full] || gp.cnt[op_join] || gp.cnt[op_semi] || gp.cnt[op_anti]))
- rel = rel_visitor_bottomup(&v, rel, &rel_remove_redundant_join);
-
if (level <= 1 && value_based_opt)
rel = rel_exp_visitor_bottomup(&v, rel,
&rel_simplify_predicates, false);
diff --git a/sql/storage/objectset.c b/sql/storage/objectset.c
--- a/sql/storage/objectset.c
+++ b/sql/storage/objectset.c
@@ -730,8 +730,9 @@ get_valid_object_name(sql_trans *tr, obj
return ov;
else {
lock_reader(ov->os);
- ov = ov->name_based_older;
+ objectversion* name_based_older = ov->name_based_older;
unlock_reader(ov->os);
+ ov = name_based_older;
}
}
return ov;
@@ -745,8 +746,9 @@ get_valid_object_id(sql_trans *tr, objec
return ov;
else {
lock_reader(ov->os);
- ov = ov->id_based_older;
+ objectversion* id_based_older = ov->id_based_older;
unlock_reader(ov->os);
+ ov = id_based_older;
}
}
return ov;
diff --git a/tools/monetdbe/monetdbe.c b/tools/monetdbe/monetdbe.c
--- a/tools/monetdbe/monetdbe.c
+++ b/tools/monetdbe/monetdbe.c
@@ -654,10 +654,11 @@ monetdbe_create_uri(const char* host, co
const int sl_host = strlen(host);
const int sl_max_port = 6; // 2^16-1 < 100 000 = 10^5, i.e. always less
then 6 digits.
const int sl_database = strlen(database);
+ const int sl_total = sl_protocol + sl_host + 1 /* : */ + sl_max_port +
1 + /* / */ + sl_database ;
- const int sl_total = sl_protocol + sl_host + 1 /*:*/ + sl_max_port + 1
+ /*/*/ + sl_database ;
-
- str uri_buffer = GDKmalloc(sl_total + 1 /*terminator*/);
+ str uri_buffer = GDKmalloc(sl_total + 1 /* terminator */);
+ if (!uri_buffer)
+ return NULL;
snprintf(uri_buffer, sl_total, "%s%s:%d/%s", protocol, host, port,
database);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list