Changeset: f54259946af9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f54259946af9
Modified Files:
clients/mapiclient/ReadlineTools.c
Branch: Feb2013
Log Message:
Do selection in the server.
diffs (17 lines):
diff --git a/clients/mapiclient/ReadlineTools.c
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -72,9 +72,12 @@ sql_tablename_generator(const char *text
static MapiHdl table_hdl;
if (!state) {
+ char query[512];
+
seekpos = 0;
len = strlen(text);
- if ((table_hdl = mapi_query(_mid, "SELECT t.\"name\",
s.\"name\" FROM \"sys\".\"tables\" t, \"sys\".\"schemas\" s where t.schema_id =
s.id")) == NULL || mapi_error(_mid)) {
+ snprintf(query, sizeof(query), "SELECT t.\"name\", s.\"name\"
FROM \"sys\".\"tables\" t, \"sys\".\"schemas\" s where t.schema_id = s.id AND
t.\"name\" like '%s%%'", text);
+ if ((table_hdl = mapi_query(_mid, query)) == NULL ||
mapi_error(_mid)) {
if (table_hdl) {
mapi_explain_query(table_hdl, stderr);
mapi_close_handle(table_hdl);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list