mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29397 CONNECT engine: Fix note turning into error (#2325)
* MDEV-29397 Fix note turning into error ODBC Rewind triggered an error with no SQL, but this is sometimes a valid condition (as can be seen with other classes). Setting this to a 0 return stops errors firing when they shouldn't. Also fixes ASAN hits from in MDEV-29687 tabext.cpp.
This commit is contained in:
@@ -473,7 +473,7 @@ bool TDBEXT::MakeSQL(PGLOBAL g, bool cnt)
|
||||
my_len= res - buf + 1;
|
||||
my_schema_table= (char *) malloc(my_len);
|
||||
memcpy(my_schema_table, buf, my_len - 1);
|
||||
my_schema_table[my_len] = 0;
|
||||
my_schema_table[my_len - 1] = 0;
|
||||
Query->Append(Quote);
|
||||
Query->Append(my_schema_table);
|
||||
Query->Append(Quote);
|
||||
@@ -481,7 +481,7 @@ bool TDBEXT::MakeSQL(PGLOBAL g, bool cnt)
|
||||
Query->Append(".");
|
||||
// Parse table
|
||||
my_len= strlen(buf) - my_len + 1;
|
||||
my_schema_table= (char *) malloc(my_len);
|
||||
my_schema_table= (char *) malloc(my_len + 1);
|
||||
memcpy(my_schema_table, ++res, my_len);
|
||||
my_schema_table[my_len] = 0;
|
||||
Query->Append(Quote);
|
||||
|
Reference in New Issue
Block a user