summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-04-27 10:46:41 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2023-04-27 10:46:41 +0200
commita959c22e7fbbac9c19cc9e1dfb18284bf7c67046 (patch)
treebb51df0a49bece902a32943dafdfe892af9201b9
parent6171119bc145a91d94a89458142e087924e4a9c6 (diff)
downloadmariadb-git-a959c22e7fbbac9c19cc9e1dfb18284bf7c67046.tar.gz
return accidentally removed in 45d4f6b97b4811b1b7783dcd19526be1dbb196dc commentbb-10.4-MDEV-30889
-rw-r--r--sql/table.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index fd5334271be..15a92818b81 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -3171,6 +3171,12 @@ int TABLE_SHARE::init_from_sql_statement_string(THD *thd, bool write,
LEX_CSTRING db_backup= thd->db;
DBUG_ENTER("TABLE_SHARE::init_from_sql_statement_string");
+ /*
+ Ouch. Parser may *change* the string it's working on.
+ Currently (2013-02-26) it is used to permanently disable
+ conditional comments.
+ Anyway, let's copy the caller's string...
+ */
if (!(sql_copy= thd->strmake(sql, sql_length)))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);