List:Commits« Previous MessageNext Message »
From:gluh Date:November 19 2007 9:42am
Subject:bk commit into 5.1 tree (gluh:1.2630) BUG#32158
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-11-19 12:42:25+04:00, gluh@stripped +1 -0
  Bug#32158 Crash in open_table_from_share, on mysql_unpack_partition errors
  added check for the result of mysql_unpack_partition()

  sql/table.cc@stripped, 2007-11-19 12:42:23+04:00, gluh@stripped +9 -3
    added check for the result of mysql_unpack_partition()

diff -Nrup a/sql/table.cc b/sql/table.cc
--- a/sql/table.cc	2007-11-10 14:58:37 +04:00
+++ b/sql/table.cc	2007-11-19 12:42:23 +04:00
@@ -1787,13 +1787,18 @@ int open_table_from_share(THD *thd, TABL
                                 outparam, is_create_table,
                                 share->default_part_db_type,
                                 &work_part_info_used);
-    if (!tmp)
-      outparam->part_info->is_auto_partitioned= share->auto_partitioned;
+    if (tmp)
+    {
+      thd->stmt_arena= backup_stmt_arena_ptr;
+      thd->restore_active_arena(&part_func_arena, &backup_arena);
+      goto partititon_err;
+    }
+    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
        caller's arena depending on work_part_info_used value
     */
-    if (!tmp && !work_part_info_used)
+    if (!work_part_info_used)
       tmp= fix_partition_func(thd, outparam, is_create_table);
     thd->stmt_arena= backup_stmt_arena_ptr;
     thd->restore_active_arena(&part_func_arena, &backup_arena);
@@ -1803,6 +1808,7 @@ int open_table_from_share(THD *thd, TABL
         tmp= fix_partition_func(thd, outparam, is_create_table);
       outparam->part_info->item_free_list= part_func_arena.free_list;
     }
+partititon_err:
     if (tmp)
     {
       if (is_create_table)
Thread
bk commit into 5.1 tree (gluh:1.2630) BUG#32158gluh19 Nov