Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/src
Modified Files:
Tag: Release_0_9_5_stable
dbfncs.c
Log Message:
added version check for encoding stuff
Index: dbfncs.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/dbfncs.c,v
retrieving revision 1.15.2.4
retrieving revision 1.15.2.5
diff -u -U2 -r1.15.2.4 -r1.15.2.5
--- dbfncs.c 12 Feb 2005 01:50:01 -0000 1.15.2.4
+++ dbfncs.c 12 Feb 2005 13:19:46 -0000 1.15.2.5
@@ -55,4 +55,7 @@
if (!strcmp(ptr_clrequest->dbserver, "mysql")) {
+ /* these settings should work for 3.23 and later. We'll check the
+ database engine version at runtime and fill in more appropriate
+ values if we're using a newer version */
strcpy(ptr_caps->multiple_db, "t");
strcpy(ptr_caps->sql_enum, "t");
@@ -61,5 +64,5 @@
strcpy(ptr_caps->transaction, "f");
strcpy(ptr_caps->localhost, "localhost");
- strcpy(ptr_caps->encoding, "CHARACTER SET");
+ strcpy(ptr_caps->encoding, "");
strcpy(ptr_caps->groups, "f");
strcpy(ptr_caps->admin_systable, "mysql.user");
@@ -1774,7 +1777,11 @@
if (!strcmp(drivername, "mysql")) {
- if (ver.major >= 4) {
+ if (ver.major >= 4) { /* 4.0 and later */
strcpy(ptr_dbcaps->sql_union, "t");
}
+ if ((ver.major == 4 && ver.minor > 0)
+ || ver.major > 4) { /* 4.1 and later */
+ strcpy(ptr_dbcaps->encoding, "CHARACTER SET");
+ }
}
/* else: nothing to do */
|