1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

- Fix MDEV-4881. SQL_TYPE_DECIMAL was not recognized in ha_connect::GetColumnOption.

Crash on second SELECT was because tshp was not reset to NULL in case of error.

modified:
  storage/connect/ha_connect.cc
  storage/connect/tabutil.cpp
This commit is contained in:
Olivier Bertrand
2013-08-11 14:21:38 +02:00
parent 8bd158c10d
commit af9e618289
2 changed files with 13 additions and 25 deletions

View File

@ -368,7 +368,11 @@ PTDBASE TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp, bool b)
#if defined(MYSQL_SUPPORT)
// Access sub-table via MySQL API
if (!(tdbp= cat->GetTable(g, tabp, MODE_READ, "MYPRX"))) {
sprintf(g->Message, "Cannot access %s.%s", db, name);
char buf[MAX_STR];
strcpy(buf, g->Message);
sprintf(g->Message, "Error accessing %s.%s: %s", db, name, buf);
hc->tshp = NULL;
goto err;
} // endif Define