Changeset: 7896311c77f6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7896311c77f6
Modified Files:
clients/odbc/driver/ODBCAttrs.h
clients/odbc/driver/SQLConnect.c
Branch: odbc-tls
Log Message:
allow_alt_name
diffs (31 lines):
diff --git a/clients/odbc/driver/ODBCAttrs.h b/clients/odbc/driver/ODBCAttrs.h
--- a/clients/odbc/driver/ODBCAttrs.h
+++ b/clients/odbc/driver/ODBCAttrs.h
@@ -31,7 +31,7 @@ extern const struct attr_setting attr_se
extern const int attr_setting_count;
// look up attr_setting entry by name or alt_name, -1 if not found
-int attr_setting_lookup(const char *attr_name);
+int attr_setting_lookup(const char *attr_name, bool allow_alt_name);
diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c
--- a/clients/odbc/driver/SQLConnect.c
+++ b/clients/odbc/driver/SQLConnect.c
@@ -68,13 +68,13 @@ const struct attr_setting attr_settings[
const int attr_setting_count = sizeof(attr_settings) /
sizeof(attr_settings[0]);
int
-attr_setting_lookup(const char *attr_name)
+attr_setting_lookup(const char *attr_name, bool allow_alt_name)
{
for (int i = 0; i < attr_setting_count; i++) {
const struct attr_setting *entry = &attr_settings[i];
if (strcasecmp(attr_name, entry->name) == 0)
return i;
- if (entry->alt_name && strcasecmp(attr_name, entry->alt_name)
== 0)
+ if (allow_alt_name && entry->alt_name && strcasecmp(attr_name,
entry->alt_name) == 0)
return i;
}
return -1;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]