diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2022-01-06 18:14:21 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2022-01-06 18:14:21 +0100 |
commit | e3b9efb33019971e086eb9ca257d369a5208ccf6 (patch) | |
tree | 74aeb1e3f2212d61476179520092833c1b953075 /storage | |
parent | c819a7a71eadc7fa1ec58d71dfef6e37cbc4187a (diff) | |
download | mariadb-git-e3b9efb33019971e086eb9ca257d369a5208ccf6.tar.gz |
Fix incompatibility SRCDEF && MEMORY=2 for ODBC JDBC tables
Diffstat (limited to 'storage')
-rw-r--r-- | storage/connect/tabext.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp index 698f792b1f4..9e8154cd233 100644 --- a/storage/connect/tabext.cpp +++ b/storage/connect/tabext.cpp @@ -142,8 +142,14 @@ bool EXTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) Username = GetStringCatInfo(g, "User", NULL); Password = GetStringCatInfo(g, "Password", NULL); - if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL))) + // Memory was Boolean, it is now integer + if (!(Memory = GetIntCatInfo("Memory", 0))) + Memory = GetBoolCatInfo("Memory", false) ? 1 : 0; + + if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL))) { Read_Only = true; + if (Memory == 2) Memory = 1; + } // endif Srcdef Qrystr = GetStringCatInfo(g, "Query_String", "?"); Sep = GetStringCatInfo(g, "Separator", NULL); @@ -166,10 +172,6 @@ bool EXTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) if (Catfunc == FNC_TABLE) Tabtyp = GetStringCatInfo(g, "Tabtype", NULL); - // Memory was Boolean, it is now integer - if (!(Memory = GetIntCatInfo("Memory", 0))) - Memory = GetBoolCatInfo("Memory", false) ? 1 : 0; - Pseudo = 2; // FILID is Ok but not ROWID return false; } // end of DefineAM |