revision-id: 6d377a523c78b1e442d69ae6be548bccddd54416 (mariadb-10.2.16-9-g6d377a5) parent(s): 31c950cca8fa1623d41a8a7784e09fbcd6bc2c71 author: Igor Babaev committer: Igor Babaev timestamp: 2018-06-26 10:49:23 -0700 message: Correction for the patch to fix mdev-16473. --- sql/sql_base.cc | 2 +- sql/sql_class.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 062106d..093f7cf 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -3331,7 +3331,7 @@ open_and_process_table(THD *thd, LEX *lex, TABLE_LIST *tables, Not a placeholder: must be a base/temporary table or a view. Let us open it. */ - if (tables->db == no_db) + if (tables->db[0] == no_db[0]) { my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); error= TRUE; diff --git a/sql/sql_class.h b/sql/sql_class.h index ad2d0ab..e79fde0 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3960,8 +3960,8 @@ class THD :public Statement, return TRUE; } /* This will allow to throw an error later for non-CTE references */ - *p_db= (char *) no_db; *p_db_length= strlen(no_db); + *p_db= strmake(no_db, *p_db_length); } else {