Changeset: 5d515713c9b2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5d515713c9b2 Branch: Jun2023 Log Message:
Merge heads. diffs (292 lines): diff --git a/clients/examples/C/bincopydata.c b/clients/examples/C/bincopydata.c --- a/clients/examples/C/bincopydata.c +++ b/clients/examples/C/bincopydata.c @@ -476,6 +476,7 @@ main(int argc, char *argv[]) gen(dest, byteswap, nrecs, gen_arg); fclose(dest); + free(gen_arg); return 0; } diff --git a/clients/odbc/ChangeLog.Jun2023 b/clients/odbc/ChangeLog.Jun2023 --- a/clients/odbc/ChangeLog.Jun2023 +++ b/clients/odbc/ChangeLog.Jun2023 @@ -1,6 +1,17 @@ # ChangeLog file for odbc # This file is updated with Maddlog +* Thu May 25 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> +- Extended Windows MonetDB ODBC Data Source setup program with option + to specify a logfile to enable tracing of ODBC Driver API calls. + On other platforms users can edit the odbc.ini file and add a line: + logfile=/home/username/odbctrace.log + When a logfile is specified it will start logging the ODBC Driver API calls + to the logfile after a new connection is made via SQLConnect() or + SQLDriverConnect() or SQLBrowseConnect(). + Note that enabling ODBC logging will slow down the performance of ODBC + applications, so enable it only for analysing ODBC Driver problems. + * Thu Apr 13 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> - Enhanced SQLTables() by adding support for table type names: 'BASE TABLE', 'GLOBAL TEMPORARY' and 'LOCAL TEMPORARY' in parameter TableType. These are diff --git a/clients/odbc/winsetup/resource.h b/clients/odbc/winsetup/resource.h --- a/clients/odbc/winsetup/resource.h +++ b/clients/odbc/winsetup/resource.h @@ -13,14 +13,15 @@ // Used by odbcconfig.rc // #define IDD_SETUP_DIALOG 106 -#define IDC_EDIT_DSN 2000 -#define IDC_EDIT_UID 2001 -#define IDC_EDIT_PWD 2002 -#define IDC_EDIT_HOST 2003 -#define IDB_BANNER 2003 -#define IDC_EDIT_PORT 2004 -#define IDC_BUTTON_CANCEL 2006 -#define IDC_EDIT_DATABASE 2007 +#define IDB_BANNER 2000 +#define IDC_EDIT_DSN 2001 +#define IDC_EDIT_UID 2002 +#define IDC_EDIT_PWD 2003 +#define IDC_EDIT_HOST 2004 +#define IDC_EDIT_PORT 2005 +#define IDC_EDIT_DATABASE 2006 +#define IDC_EDIT_LOGFILE 2007 +#define IDC_BUTTON_CANCEL 2008 // Next default values for new objects // diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c --- a/clients/odbc/winsetup/setup.c +++ b/clients/odbc/winsetup/setup.c @@ -94,6 +94,7 @@ struct data { char *host; char *port; char *database; + char *logfile; HWND parent; WORD request; }; @@ -101,7 +102,7 @@ struct data { static void MergeFromProfileString(const char *dsn, char **datap, const char *entry, const char *defval) { - char buf[256]; + char buf[2048]; if (*datap != NULL) return; @@ -118,7 +119,7 @@ static INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { static struct data *datap; - char buf[128]; + char buf[2048]; RECT rcDlg, rcOwner; switch (uMsg) { @@ -142,6 +143,7 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_HOST, datap->host ? datap->host : ""); SetDlgItemText(hwndDlg, IDC_EDIT_PORT, datap->port ? datap->port : ""); SetDlgItemText(hwndDlg, IDC_EDIT_DATABASE, datap->database ? datap->database : ""); + SetDlgItemText(hwndDlg, IDC_EDIT_LOGFILE, datap->logfile ? datap->logfile : ""); if (datap->request == ODBC_ADD_DSN && datap->dsn && *datap->dsn) EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_DSN), FALSE); return TRUE; @@ -183,6 +185,10 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR if (datap->database) free(datap->database); datap->database = strdup(buf); + GetDlgItemText(hwndDlg, IDC_EDIT_LOGFILE, buf, sizeof(buf)); + if (datap->logfile) + free(datap->logfile); + datap->logfile = strdup(buf); /* fall through */ case IDCANCEL: EndDialog(hwndDlg, LOWORD(wParam)); @@ -226,6 +232,7 @@ ConfigDSN(HWND parent, WORD request, LPC data.host = NULL; data.port = NULL; data.database = NULL; + data.logfile = NULL; data.parent = parent; data.request = request; @@ -251,6 +258,8 @@ ConfigDSN(HWND parent, WORD request, LPC data.port = strdup(value); else if (strncasecmp("database=", attributes, value - attributes) == 0) data.database = strdup(value); + else if (strncasecmp("logfile=", attributes, value - attributes) == 0) + data.logfile = strdup(value); attributes = value + strlen(value) + 1; } @@ -270,14 +279,16 @@ ConfigDSN(HWND parent, WORD request, LPC MergeFromProfileString(data.dsn, &data.host, "host", "localhost"); MergeFromProfileString(data.dsn, &data.port, "port", MAPI_PORT_STR); MergeFromProfileString(data.dsn, &data.database, "database", ""); + MergeFromProfileString(data.dsn, &data.logfile, "logfile", ""); - ODBCLOG("ConfigDSN values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s\n", + ODBCLOG("ConfigDSN values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s logfile=%s\n", data.dsn ? data.dsn : "(null)", data.uid ? data.uid : "(null)", data.pwd ? data.pwd : "(null)", data.host ? data.host : "(null)", data.port ? data.port : "(null)", - data.database ? data.database : "(null)"); + data.database ? data.database : "(null)", + data.logfile ? data.logfile : "(null)"); /* we're optimistic: default return value */ rc = TRUE; @@ -363,19 +374,21 @@ ConfigDSN(HWND parent, WORD request, LPC goto finish; } } - ODBCLOG("ConfigDSN writing values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s\n", + ODBCLOG("ConfigDSN writing values: dsn=%s uid=%s pwd=%s host=%s port=%s database=%s logfile=%s\n", data.dsn ? data.dsn : "(null)", data.uid ? data.uid : "(null)", data.pwd ? data.pwd : "(null)", data.host ? data.host : "(null)", data.port ? data.port : "(null)", - data.database ? data.database : "(null)"); + data.database ? data.database : "(null)", + data.logfile ? data.logfile : "(null)"); if (!SQLWritePrivateProfileString(data.dsn, "uid", data.uid, "odbc.ini") || !SQLWritePrivateProfileString(data.dsn, "pwd", data.pwd, "odbc.ini") || !SQLWritePrivateProfileString(data.dsn, "host", data.host, "odbc.ini") || !SQLWritePrivateProfileString(data.dsn, "port", data.port, "odbc.ini") || - !SQLWritePrivateProfileString(data.dsn, "database", data.database, "odbc.ini")) { + !SQLWritePrivateProfileString(data.dsn, "database", data.database, "odbc.ini") || + !SQLWritePrivateProfileString(data.dsn, "logfile", data.logfile, "odbc.ini")) { rc = FALSE; if (parent) MessageBox(parent, @@ -400,6 +413,8 @@ ConfigDSN(HWND parent, WORD request, LPC free(data.port); if (data.database) free(data.database); + if (data.logfile) + free(data.logfile); ODBCLOG("ConfigDSN returning %s\n", rc ? "TRUE" : "FALSE"); return rc; } diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -103,7 +103,7 @@ END // Dialog // -IDD_SETUP_DIALOG DIALOGEX 0, 0, 210, 163 +IDD_SETUP_DIALOG DIALOGEX 0, 0, 226, 163 STYLE DS_MODALFRAME | WS_CAPTION CAPTION "MonetDB Data Source Configuration" FONT 8, "MS Shell Dlg", 0, 0, 0x0 @@ -114,15 +114,17 @@ BEGIN EDITTEXT IDC_EDIT_HOST,75,88,128,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT_PORT,75,104,128,14,ES_AUTOHSCROLL | ES_NUMBER EDITTEXT IDC_EDIT_DATABASE,75,120,128,14,ES_AUTOHSCROLL - DEFPUSHBUTTON "OK",IDOK,7,141,50,14 - PUSHBUTTON "Cancel",IDCANCEL,153,141,50,14 + EDITTEXT IDC_EDIT_LOGFILE,75,136,128,14,ES_AUTOHSCROLL LTEXT "Data Source Name",IDC_STATIC,7,42,63,8 LTEXT "User Name",IDC_STATIC,7,58,36,8 LTEXT "Password",IDC_STATIC,7,74,32,8 LTEXT "Host",IDC_STATIC,7,90,16,8 LTEXT "Port",IDC_STATIC,7,106,14,8 + LTEXT "Database",IDC_STATIC,7,122,32,8 + LTEXT "Logfile",IDC_STATIC,7,138,32,8 + DEFPUSHBUTTON "OK",IDOK,7,157,50,14 + PUSHBUTTON "Cancel",IDCANCEL,153,157,50,14 CONTROL 2003,IDC_STATIC,"Static",SS_BITMAP,0,0,240,37 - LTEXT "Database",IDC_STATIC,7,122,32,8 END @@ -137,9 +139,9 @@ BEGIN IDD_SETUP_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 203 + RIGHTMARGIN, 155 TOPMARGIN, 7 - BOTTOMMARGIN, 155 + BOTTOMMARGIN, 219 END END #endif // APSTUDIO_INVOKED diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All --- a/monetdb5/modules/mal/Tests/All +++ b/monetdb5/modules/mal/Tests/All @@ -10,8 +10,6 @@ inspect00 inspect10 #inspect40 word size problems on different platforms -register00 - mserver00 qgram @@ -20,10 +18,6 @@ groupby00 imprints -call00 -callstring -callfunction - # flags is influecend by the Mtest command line ascii_io2 diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c --- a/sql/backends/monet5/sql_user.c +++ b/sql/backends/monet5/sql_user.c @@ -196,8 +196,8 @@ parse_schema_path_str(mvc *m, str schema if (build) { while (l->t) /* if building, empty schema_path list */ (void) list_remove_node(l, NULL, l->t); - m->schema_path_has_sys = 0; - m->schema_path_has_tmp = 0; + m->schema_path_has_sys = false; + m->schema_path_has_tmp = false; } for (size_t i = 0; schema_path[i]; i++) { diff --git a/sql/server/rel_psm.c b/sql/server/rel_psm.c --- a/sql/server/rel_psm.c +++ b/sql/server/rel_psm.c @@ -1254,7 +1254,7 @@ create_trigger(sql_query *query, dlist * const char *old_name = NULL, *new_name = NULL; dlist *stmts = triggered_action->h->next->next->data.lval; symbol *condition = triggered_action->h->next->data.sym; - int8_t old_useviews = sql->use_views; + bool old_useviews = sql->use_views; if (opt_ref) { dnode *dl = opt_ref->h; diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c --- a/sql/server/sql_mvc.c +++ b/sql/server/sql_mvc.c @@ -802,7 +802,7 @@ mvc_create(sql_store *store, sql_allocat m->topframes = 0; m->frame = 0; - m->use_views = 0; + m->use_views = false; if (!m->frames) { qc_destroy(m->qc); return NULL; @@ -841,7 +841,7 @@ mvc_create(sql_store *store, sql_allocat return NULL; } m->schema_path_has_sys = true; - m->schema_path_has_tmp = 0; + m->schema_path_has_tmp = false; m->store = store; m->session = sql_session_create(m->store, m->pa, 1 /*autocommit on*/); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org