diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-05-24 15:48:19 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-05-24 15:48:19 +0400 |
commit | 0bf85cfdfaf8eb7315005760e9516bba5e530ce2 (patch) | |
tree | 9e2c5a69eee50a79fd247742cdbbb1fa8abd0c72 /sql | |
parent | 0e86cf8aba3c7d067dd28efd78f138d467ec7e7b (diff) | |
download | mariadb-git-0bf85cfdfaf8eb7315005760e9516bba5e530ce2.tar.gz |
Fix for bug which caused temp_table.test fail on Darwin 7.3
The code in mysql_create_table() code assumes that if lower_case_names==2 then table alias
should contain unchanged table name, and this was not true for temporary tables which
had 'tmp-table' constant as alias. Now we are using table name as alias for such tables.
sql/sql_lex.cc:
Removed tmp_table_alias constant which is no longer used.
sql/sql_lex.h:
Removed tmp_table_alias constant which is no longer used.
sql/sql_yacc.yy:
Let us use table name instead of 'tmp-table' as alias for table being created by
CREATE TEMPORARY TABLE statement. This fixes failing temp_table.test on Darwin 7.3
since mysql_create_table() code assumes that if lower_case_names==2 then table alias
should contain unchanged table name (and now this assumtion is true but it were false
for temporary tables before...).
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_lex.cc | 2 | ||||
-rw-r--r-- | sql/sql_lex.h | 2 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 6 |
3 files changed, 1 insertions, 9 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 0d3ab196aa5..f98a6b43846 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -22,8 +22,6 @@ #include <m_ctype.h> #include <hash.h> -LEX_STRING tmp_table_alias= {(char*) "tmp-table",8}; - /* Macros to look like lex */ #define yyGet() *(lex->ptr++) diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 2df2c998ff0..e458fe96cff 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -642,6 +642,4 @@ void lex_end(LEX *lex); extern pthread_key(LEX*,THR_LEX); -extern LEX_STRING tmp_table_alias; - #define current_lex (current_thd->lex) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 45e8e6e67e2..6c544030b41 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -917,11 +917,7 @@ create: THD *thd= YYTHD; LEX *lex=Lex; lex->sql_command= SQLCOM_CREATE_TABLE; - if (!lex->select_lex.add_table_to_list(thd,$5, - ($2 & - HA_LEX_CREATE_TMP_TABLE ? - &tmp_table_alias : - (LEX_STRING*) 0), + if (!lex->select_lex.add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING, (using_update_log ? TL_READ_NO_INSERT: |