List:Commits« Previous MessageNext Message »
From:gluh Date:March 1 2006 9:42am
Subject:bk commit into 5.1 tree (gluh:1.2211) BUG#14363
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
  1.2211 06/03/01 12:42:33 gluh@stripped +3 -0
  Fix for bug#14363 Partitions: failure if create in stored procedure
    store copy of partition function string

  sql/sql_yacc.yy
    1.470 06/03/01 12:42:26 gluh@stripped +2 -2
    Fix for bug#14363 Partitions: failure if create in stored procedure
      store copy of partition function string

  mysql-test/t/partition.test
    1.18 06/03/01 12:42:26 gluh@stripped +35 -0
    Fix for bug#14363 Partitions: failure if create in stored procedure
      test case

  mysql-test/r/partition.result
    1.14 06/03/01 12:42:26 gluh@stripped +25 -0
    Fix for bug#14363 Partitions: failure if create in stored procedure
      test case

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Bugs/5.1.17568

--- 1.469/sql/sql_yacc.yy	Tue Feb 28 21:33:26 2006
+++ 1.470/sql/sql_yacc.yy	Wed Mar  1 12:42:26 2006
@@ -3489,7 +3489,7 @@ part_func:
           uint expr_len= (uint)($4 - $2) - 1;
           lex->part_info->list_of_part_fields= FALSE;
           lex->part_info->part_expr= $3;
-          lex->part_info->part_func_string= $2+1;
+          lex->part_info->part_func_string= (char* ) sql_memdup($2+1, expr_len);
           lex->part_info->part_func_len= expr_len;
         }
         ;
@@ -3501,7 +3501,7 @@ sub_part_func:
           uint expr_len= (uint)($4 - $2) - 1;
           lex->part_info->list_of_subpart_fields= FALSE;
           lex->part_info->subpart_expr= $3;
-          lex->part_info->subpart_func_string= $2+1;
+          lex->part_info->subpart_func_string= (char* ) sql_memdup($2+1, expr_len);
       
           lex->part_info->subpart_func_len= expr_len;
         }
         ;

--- 1.13/mysql-test/r/partition.result	Fri Feb 24 16:50:16 2006
+++ 1.14/mysql-test/r/partition.result	Wed Mar  1 12:42:26 2006
@@ -348,4 +348,29 @@ INSERT INTO t1 SET f_int1 = 2, f_int2 = 
 SELECT * FROM t1 WHERE f_int1  IS NULL;
 f_int1	f_int2	f_char1	f_char2	f_charbig
 drop table t1;
+create procedure p ()
+begin
+create table t1 (s1 mediumint,s2 mediumint)
+partition by list (s2)
+(partition p1 values in (0),
+partition p2 values in (1));
+end//
+call p()//
+drop procedure p//
+drop table t1;
+create procedure p ()
+begin
+create table t1 (a int not null,b int not null,c int not null,primary key (a,b))
+partition by range (a)
+subpartition by hash (a+b)
+(partition x1 values less than (1)
+(subpartition x11,
+subpartition x12),
+partition x2 values less than (5)
+(subpartition x21,
+subpartition x22));
+end//
+call p()//
+drop procedure p//
+drop table t1//
 End of 5.1 tests

--- 1.17/mysql-test/t/partition.test	Fri Feb 24 16:50:17 2006
+++ 1.18/mysql-test/t/partition.test	Wed Mar  1 12:42:26 2006
@@ -448,4 +448,39 @@ INSERT INTO t1 SET f_int1 = 2, f_int2 = 
 SELECT * FROM t1 WHERE f_int1  IS NULL;
 drop table t1;
 
+#
+# Bug#14363 Partitions: failure if create in stored procedure
+#
+delimiter //;
+
+create procedure p ()
+begin
+create table t1 (s1 mediumint,s2 mediumint)
+partition by list (s2)
+(partition p1 values in (0),
+ partition p2 values in (1));
+end//
+
+call p()//
+drop procedure p//
+drop table t1;
+
+create procedure p ()
+begin
+create table t1 (a int not null,b int not null,c int not null,primary key (a,b))
+partition by range (a)
+subpartition by hash (a+b)
+(partition x1 values less than (1)
+ (subpartition x11,
+  subpartition x12),
+ partition x2 values less than (5)
+ (subpartition x21,
+  subpartition x22));
+end//
+
+call p()//
+drop procedure p//
+drop table t1//
+delimiter ;//
+
 --echo End of 5.1 tests
Thread
bk commit into 5.1 tree (gluh:1.2211) BUG#14363gluh1 Mar