diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-18 13:11:16 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-18 13:11:16 +0200 |
commit | 0ba528fe56f6c637d9fbc9d177a62610038fd519 (patch) | |
tree | e6df324715a545f1f9a82e7ed5cb37eca32d9fbd /sql | |
parent | 84984b79f27399d015c43a51d2b1967838119d34 (diff) | |
download | mariadb-git-10.2.tar.gz |
MDEV-28606 Server crashes in st_select_lex::add_table_to_list instead of error 1066: Not unique table/aliasmariadb-10.2.44bb-10.2-release10.2
10.2-only fix, 10.3+ uses LEX_STRING's and checks the length first
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 457849a7569..5295fb5e0aa 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -8040,7 +8040,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, tables=tables->next_local) { if (!my_strcasecmp(table_alias_charset, alias_str, tables->alias) && - !strcmp(ptr->db, tables->db)) + !strcmp(safe_str(ptr->db), safe_str(tables->db))) { my_error(ER_NONUNIQ_TABLE, MYF(0), alias_str); /* purecov: tested */ DBUG_RETURN(0); /* purecov: tested */ |