Changeset: 6961fac9b890 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6961fac9b890 Branch: default Log Message:
merged diffs (truncated from 3530 to 300 lines): diff --git a/clients/examples/python/sqlsample.py b/clients/examples/python/sqlsample.py --- a/clients/examples/python/sqlsample.py +++ b/clients/examples/python/sqlsample.py @@ -11,28 +11,33 @@ import sys dbh = pymonetdb.connect(port=int(sys.argv[1]),database=sys.argv[2],hostname=sys.argv[3],autocommit=True) -cursor = dbh.cursor(); +cursor = dbh.cursor() cursor.execute('select 1;') -print(cursor.fetchall()) +if cursor.fetchall() != [(1,)]: + sys.stderr.write("Just row (1,) expected") -cursor = dbh.cursor(); +cursor = dbh.cursor() cursor.execute('select 2;') -print(cursor.fetchone()) +if cursor.fetchall() != [(2,)]: + sys.stderr.write("Just row (2,) expected") # deliberately executing a wrong SQL statement: try: cursor.execute('select commit_action, access from tables group by access;') + sys.stderr.write("Grouping error expected") except pymonetdb.OperationalError as e: - print(e) + if 'SELECT: cannot use non GROUP BY column \'commit_action\' in query results without an aggregate function' not in str(e): + raise e -cursor.execute('create table python_table (i smallint,s string);'); -cursor.execute('insert into python_table values ( 3, \'three\');'); -cursor.execute('insert into python_table values ( 7, \'seven\');'); -cursor.execute('select * from python_table;'); -print(cursor.fetchall()) +cursor.execute('create table python_table (i smallint,s string);') +cursor.execute('insert into python_table values ( 3, \'three\');') +cursor.execute('insert into python_table values ( 7, \'seven\');') +cursor.execute('select * from python_table;') +if cursor.fetchall() != [(3, 'three'), (7, 'seven')]: + sys.stderr.write("Result set [(3, 'three'), (7, 'seven')] expected") s = ((0, 'row1'), (1, 'row2')) -x = cursor.executemany("insert into python_table VALUES (%s, %s);", s) -print(x); +if cursor.executemany("insert into python_table VALUES (%s, %s);", s) != 2: + sys.stderr.write("2 rows inserted expected") -cursor.execute('drop table python_table;'); +cursor.execute('drop table python_table;') diff --git a/clients/odbc/samples/testgetinfo.c b/clients/odbc/samples/testgetinfo.c --- a/clients/odbc/samples/testgetinfo.c +++ b/clients/odbc/samples/testgetinfo.c @@ -79,7 +79,7 @@ const struct { enum { STRING, INTEGER, - SHORT, + SHORTINT, } type; char *name; union { @@ -161,7 +161,7 @@ const struct { { .info = SQL_CATALOG_LOCATION, .name = "SQL_CATALOG_LOCATION", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { @@ -203,7 +203,7 @@ const struct { { .info = SQL_CONCAT_NULL_BEHAVIOR, .name = "SQL_CONCAT_NULL_BEHAVIOR", - .type = SHORT, + .type = SHORTINT, .s = SQL_CB_NULL, }, { @@ -341,7 +341,7 @@ const struct { { .info = SQL_CORRELATION_NAME, .name = "SQL_CORRELATION_NAME", - .type = SHORT, + .type = SHORTINT, .s = SQL_CN_ANY, }, { @@ -395,13 +395,13 @@ const struct { { .info = SQL_CURSOR_COMMIT_BEHAVIOR, .name = "SQL_CURSOR_COMMIT_BEHAVIOR", - .type = SHORT, + .type = SHORTINT, .s = SQL_CB_DELETE, }, { .info = SQL_CURSOR_ROLLBACK_BEHAVIOR, .name = "SQL_CURSOR_ROLLBACK_BEHAVIOR", - .type = SHORT, + .type = SHORTINT, .s = SQL_CB_DELETE, }, { @@ -565,7 +565,7 @@ const struct { { .info = SQL_FILE_USAGE, .name = "SQL_FILE_USAGE", - .type = SHORT, + .type = SHORTINT, .s = SQL_FILE_NOT_SUPPORTED, }, { @@ -589,13 +589,13 @@ const struct { { .info = SQL_GROUP_BY, .name = "SQL_GROUP_BY", - .type = SHORT, + .type = SHORTINT, .s = SQL_GB_NO_RELATION, }, { .info = SQL_IDENTIFIER_CASE, .name = "SQL_IDENTIFIER_CASE", - .type = SHORT, + .type = SHORTINT, .s = SQL_IC_LOWER, }, { @@ -667,7 +667,7 @@ const struct { { .info = SQL_MAX_CATALOG_NAME_LEN, .name = "SQL_MAX_CATALOG_NAME_LEN", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { @@ -679,55 +679,55 @@ const struct { { .info = SQL_MAX_COLUMN_NAME_LEN, .name = "SQL_MAX_COLUMN_NAME_LEN", - .type = SHORT, + .type = SHORTINT, .s = 1024, }, { .info = SQL_MAX_COLUMNS_IN_GROUP_BY, .name = "SQL_MAX_COLUMNS_IN_GROUP_BY", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { .info = SQL_MAX_COLUMNS_IN_INDEX, .name = "SQL_MAX_COLUMNS_IN_INDEX", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { .info = SQL_MAX_COLUMNS_IN_ORDER_BY, .name = "SQL_MAX_COLUMNS_IN_ORDER_BY", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { .info = SQL_MAX_COLUMNS_IN_SELECT, .name = "SQL_MAX_COLUMNS_IN_SELECT", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { .info = SQL_MAX_COLUMNS_IN_TABLE, .name = "SQL_MAX_COLUMNS_IN_TABLE", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { .info = SQL_MAX_CURSOR_NAME_LEN, .name = "SQL_MAX_CURSOR_NAME_LEN", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { .info = SQL_MAX_DRIVER_CONNECTIONS, .name = "SQL_MAX_DRIVER_CONNECTIONS", - .type = SHORT, + .type = SHORTINT, .s = 64, }, { .info = SQL_MAX_IDENTIFIER_LEN, .name = "SQL_MAX_IDENTIFIER_LEN", - .type = SHORT, + .type = SHORTINT, .s = 1024, }, { @@ -739,7 +739,7 @@ const struct { { .info = SQL_MAX_PROCEDURE_NAME_LEN, .name = "SQL_MAX_PROCEDURE_NAME_LEN", - .type = SHORT, + .type = SHORTINT, .s = 256, }, { @@ -757,7 +757,7 @@ const struct { { .info = SQL_MAX_SCHEMA_NAME_LEN, .name = "SQL_MAX_SCHEMA_NAME_LEN", - .type = SHORT, + .type = SHORTINT, .s = 1024, }, { @@ -769,19 +769,19 @@ const struct { { .info = SQL_MAX_TABLE_NAME_LEN, .name = "SQL_MAX_TABLE_NAME_LEN", - .type = SHORT, + .type = SHORTINT, .s = 1024, }, { .info = SQL_MAX_TABLES_IN_SELECT, .name = "SQL_MAX_TABLES_IN_SELECT", - .type = SHORT, + .type = SHORTINT, .s = 0, }, { .info = SQL_MAX_USER_NAME_LEN, .name = "SQL_MAX_USER_NAME_LEN", - .type = SHORT, + .type = SHORTINT, .s = 1024, }, { @@ -805,13 +805,13 @@ const struct { { .info = SQL_NON_NULLABLE_COLUMNS, .name = "SQL_NON_NULLABLE_COLUMNS", - .type = SHORT, + .type = SHORTINT, .s = SQL_NNC_NON_NULL, }, { .info = SQL_NULL_COLLATION, .name = "SQL_NULL_COLLATION", - .type = SHORT, + .type = SHORTINT, .s = SQL_NC_LOW, }, { @@ -871,7 +871,7 @@ const struct { { .info = SQL_QUOTED_IDENTIFIER_CASE, .name = "SQL_QUOTED_IDENTIFIER_CASE", - .type = SHORT, + .type = SHORTINT, .s = SQL_IC_SENSITIVE, }, { @@ -1051,7 +1051,7 @@ const struct { { .info = SQL_TXN_CAPABLE, .name = "SQL_TXN_CAPABLE", - .type = SHORT, + .type = SHORTINT, .s = SQL_TC_ALL, }, { @@ -1135,7 +1135,7 @@ main(int argc, char **argv) sqlinfo[n].i != i) fprintf(stderr, "%s: expected: %u, received: %u\n", sqlinfo[n].name, sqlinfo[n].i, i); break; - default: /* case SHORT */ + default: /* case SHORTINT */ ret = SQLGetInfo(dbc, sqlinfo[n].info, &s, sizeof(s), &resultlen); if (check(ret, SQL_HANDLE_DBC, dbc, "SQLGetInfo") && sqlinfo[n].s != s) diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c --- a/gdk/gdk_align.c +++ b/gdk/gdk_align.c @@ -141,7 +141,7 @@ VIEWcreate(oid seq, BAT *b) GDKfree(bn); return NULL; } - TRC_DEBUG(ALGO, "VIEWcreate(" ALGOBATFMT ")=" ALGOBATFMT "\n", + TRC_DEBUG(ALGO, ALGOBATFMT " -> " ALGOBATFMT "\n", ALGOBATPAR(b), ALGOBATPAR(bn)); return bn; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list