Skip to content

Commit

Permalink
Fix incompatibility SRCDEF && MEMORY=2 for ODBC JDBC tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Buggynours committed Jan 6, 2022
1 parent c819a7a commit e3b9efb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions storage/connect/tabext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit e3b9efb

Please sign in to comment.