diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-10-09 19:16:39 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-10-09 19:16:39 +0500 |
commit | 8ae794bbd6cf2de6d9abe63c068aff067829c0b1 (patch) | |
tree | c448012ac6951fe6ea62bbb0865cd44493e13145 /sql/sql_lex.cc | |
parent | 6b957bcba4b54168219c92152e2f7ab158db5c74 (diff) | |
download | mariadb-git-8ae794bbd6cf2de6d9abe63c068aff067829c0b1.tar.gz |
Fix for bug #29444: crash with partition refering to table in create-select
Problem: creating a partitioned table during name resolution for the
partition function we search for column names in all parts of the
CREATE TABLE query. It is superfluous (and wrong) sometimes.
Fix: launch name resolution for the partition function against
the table we're creating.
mysql-test/r/partition.result:
Fix for bug #29444: crash with partition refering to table in create-select
- test result.
mysql-test/t/partition.test:
Fix for bug #29444: crash with partition refering to table in create-select
- test result.
sql/item.cc:
Fix for bug #29444: crash with partition refering to table in create-select
- LEX::use_only_table_context introduced, which is used in the
Item_field::fix_fields() to resolve names only against
context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.cc:
Fix for bug #29444: crash with partition refering to table in create-select
- LEX::use_only_table_context introduced, which is used in the
Item_field::fix_fields() to resolve names only against
context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.h:
Fix for bug #29444: crash with partition refering to table in create-select
- LEX::use_only_table_context introduced, which is used in the
Item_field::fix_fields() to resolve names only against
context->first_name_resolution_table/last_name_resolution_table.
sql/sql_partition.cc:
Fix for bug #29444: crash with partition refering to table in create-select
- set the lex->use_only_table_context before the func_expr->fix_fields()
call to ensure we're resolving names against the table we're creating;
then restore it back after the call.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 0a5f83af400..4ee66cb1e8d 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -338,6 +338,7 @@ void lex_start(THD *thd) lex->query_tables= 0; lex->reset_query_tables_list(FALSE); lex->expr_allows_subselect= TRUE; + lex->use_only_table_context= FALSE; lex->name.str= 0; lex->name.length= 0; |