summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <pappa@c-0c0be253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-01-18 16:09:25 -0500
committerunknown <pappa@c-0c0be253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-01-18 16:09:25 -0500
commitca1bb5a046b5863c0623681a7fc00e8bf22c8be1 (patch)
treebebda4a2bb13c4398f5e934d280cc27f54c6b3f8
parent35137c3d91746f7e5470502597646a5e7e042c76 (diff)
downloadmariadb-git-ca1bb5a046b5863c0623681a7fc00e8bf22c8be1.tar.gz
Bug fix
mysql-test/include/partition_1.inc: Drop table missing in test case sql/sql_partition.cc: Removed some dead code sql/sql_yacc.yy: initialised name that was missing
-rw-r--r--mysql-test/include/partition_1.inc1
-rw-r--r--sql/sql_partition.cc10
-rw-r--r--sql/sql_yacc.yy1
3 files changed, 7 insertions, 5 deletions
diff --git a/mysql-test/include/partition_1.inc b/mysql-test/include/partition_1.inc
index a6a14fde4c6..e6618af2979 100644
--- a/mysql-test/include/partition_1.inc
+++ b/mysql-test/include/partition_1.inc
@@ -745,3 +745,4 @@ if ($fixed_bug16370)
--source include/partition_12.inc
}
DROP TABLE t1;
+DROP TABLE if exists t0_template;
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index d17d088c667..2d1854d9520 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -3867,7 +3867,9 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
DBUG_PRINT("info", ("Successful parse"));
part_info= lex.part_info;
- DBUG_PRINT("info", ("default engine = %d", ha_legacy_type(part_info->default_engine_type)));
+ DBUG_PRINT("info", ("default engine = %d, default_db_type = %d",
+ ha_legacy_type(part_info->default_engine_type),
+ ha_legacy_type(default_db_type)));
if (is_create_table_ind)
{
if (old_lex->name)
@@ -3877,10 +3879,6 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
old_lex->name contains the t2 and the table we are opening has
name t1.
*/
- Table_ident *ti= (Table_ident*)old_lex->name;
- const char *db_name= ti->db.str ? ti->db.str : thd->db;
- const char *table_name= ti->table.str;
- handler *file;
if (partition_default_handling(table, part_info))
{
DBUG_RETURN(TRUE);
@@ -3892,7 +3890,9 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
table->part_info= part_info;
table->file->set_part_info(part_info);
if (part_info->default_engine_type == NULL)
+ {
part_info->default_engine_type= default_db_type;
+ }
else
{
DBUG_ASSERT(part_info->default_engine_type == default_db_type);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 69c33a8e7d0..3f0222229dc 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1229,6 +1229,7 @@ create:
lex->key_list.empty();
lex->col_list.empty();
lex->change=NullS;
+ lex->name=0;
}
'(' key_list ')' opt_fulltext_parser
{