From 92bfebb66eaddacd5d2dfa6cf749d721a921ff4c Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 20 Nov 2009 00:13:54 +0100 Subject: Bug#32115: Bad use of Name_resolution_context from current LEX in partitioning port from mysql-next (5.4) to mysql-next-mr-bugfixing (5.5/5.6?) 2755 Konstantin Osipov 2008-11-27 Bug#32115 will remove the pre-requisite to initialize LEX to open tables. This dependency was added in 5.1 and was supposed to be removed in 6.0. Remove asserts and initialization of LEX in places where we don't deal with partitioned tables. --- sql/table.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sql/table.cc') diff --git a/sql/table.cc b/sql/table.cc index 22b4b2f9b5e..600bd8bb33d 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1649,9 +1649,6 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, DBUG_PRINT("enter",("name: '%s.%s' form: 0x%lx", share->db.str, share->table_name.str, (long) outparam)); - /* Parsing of partitioning information from .frm needs thd->lex set up. */ - DBUG_ASSERT(thd->lex->is_lex_started); - error= 1; bzero((char*) outparam, sizeof(*outparam)); outparam->in_use= thd; @@ -1833,6 +1830,8 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, thd->restore_active_arena(&part_func_arena, &backup_arena); goto partititon_err; } + /* fix_partition_func needs thd->lex set up. TODO: fix! */ + DBUG_ASSERT(thd->lex->is_lex_started); outparam->part_info->is_auto_partitioned= share->auto_partitioned; DBUG_PRINT("info", ("autopartitioned: %u", share->auto_partitioned)); /* we should perform the fix_partition_func in either local or -- cgit v1.2.1 From 4205c622e1a741bae1b2d8d213342f8e0bdd936a Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 20 Nov 2009 01:20:08 +0100 Subject: Bug#32115: Bad use of Name_resolution_context from current LEX in partitioning port from mysql-next (5.4?) to mysql-next-mr-bugfixes (5.5/5.6?) 3477 Mikael Ronstrom 2009-07-29 Bug#32115, made use of local lex object to avoid side effects of opening partitioned tables 3478 Mikael Ronstrom 2009-07-29 Bug#32115, added an extra test in debug builds to ensure no dangling pointers to the old lex object is still around 3479 Mikael Ronstrom 2009-07-29 Bug#32115, Removed an assert that was no longer needed 3480 Mikael Ronstrom 2009-08-05 Bug#32115, fixed review comments 3481 Mikael Ronstrom 2009-08-07 Bug#32115, remove now obsolete lex_start calls --- sql/table.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'sql/table.cc') diff --git a/sql/table.cc b/sql/table.cc index 600bd8bb33d..39a7e163c37 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1830,8 +1830,6 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, thd->restore_active_arena(&part_func_arena, &backup_arena); goto partititon_err; } - /* fix_partition_func needs thd->lex set up. TODO: fix! */ - DBUG_ASSERT(thd->lex->is_lex_started); outparam->part_info->is_auto_partitioned= share->auto_partitioned; DBUG_PRINT("info", ("autopartitioned: %u", share->auto_partitioned)); /* we should perform the fix_partition_func in either local or -- cgit v1.2.1