From ca1bb5a046b5863c0623681a7fc00e8bf22c8be1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jan 2006 16:09:25 -0500 Subject: [PATCH 1/4] 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 --- mysql-test/include/partition_1.inc | 1 + sql/sql_partition.cc | 10 +++++----- sql/sql_yacc.yy | 1 + 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 { From 209ff87455cd0e122ea77545c6698d7e7f91ad31 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jan 2006 16:18:42 -0500 Subject: [PATCH 2/4] BUG #16596 Moved init to lex_start sql/sql_lex.cc: Added init to lex_start sql/sql_yacc.yy: Removed init from CREATE INDEX code --- sql/sql_lex.cc | 1 + sql/sql_yacc.yy | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 0c4e08abe26..a9050ddf277 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -179,6 +179,7 @@ void lex_start(THD *thd, const uchar *buf, uint length) lex->query_tables_own_last= 0; lex->escape_used= lex->et_compile_phase= FALSE; + lex->name= 0; lex->et= NULL; if (lex->sroutines.records) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 3f0222229dc..69c33a8e7d0 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1229,7 +1229,6 @@ create: lex->key_list.empty(); lex->col_list.empty(); lex->change=NullS; - lex->name=0; } '(' key_list ')' opt_fulltext_parser { From 0acb58e0b349985eb5dce2a2e1183a9ec94636db Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jan 2006 08:58:32 -0500 Subject: [PATCH 3/4] Fixes for broken tree mysql-test/r/partition_02myisam.result: Added to test result mysql-test/t/disabled.def: New definition of disabled test cases --- mysql-test/r/partition_02myisam.result | 1 + mysql-test/t/disabled.def | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/partition_02myisam.result b/mysql-test/r/partition_02myisam.result index 647e9379360..184f9ce17cc 100644 --- a/mysql-test/r/partition_02myisam.result +++ b/mysql-test/r/partition_02myisam.result @@ -1722,3 +1722,4 @@ INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1; ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21)); DROP TABLE t1; +DROP TABLE if exists t0_template; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 14d9f22eb6c..cb40afcb05f 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -26,5 +26,4 @@ rpl_ndb_basic : Bug#16228 rpl_sp : Bug #16456 ndb_autodiscover : Needs to be fixed w.r.t binlog ndb_autodiscover2 : Needs to be fixed w.r.t binlog -ndb_condition_pushdown: Bug #16596: Crash in mysql_unpack_partition -ndb_index_ordered : Bug #16596: Crash in mysql_unpack_partition +ndb_restore : Needs fixing From 098af0ae1aae693829f0c9daef551f2c3571c476 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jan 2006 09:05:56 -0500 Subject: [PATCH 4/4] Added two test cases that needs fixing --- mysql-test/t/disabled.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index cb40afcb05f..aff855fb65b 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -27,3 +27,5 @@ rpl_sp : Bug #16456 ndb_autodiscover : Needs to be fixed w.r.t binlog ndb_autodiscover2 : Needs to be fixed w.r.t binlog ndb_restore : Needs fixing +system_mysql_db : Needs fixing +system_mysql_db_fix : Needs fixing