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.2098 06/02/10 16:52:47 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.455 06/02/10 16:51:08 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.12 06/02/10 16:51:08 gluh@stripped +35 -0
Fix for bug#14363 Partitions: failure if create in stored procedure
test case
mysql-test/r/partition.result
1.11 06/02/10 16:51:08 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.14363
--- 1.454/sql/sql_yacc.yy Thu Feb 9 14:34:38 2006
+++ 1.455/sql/sql_yacc.yy Fri Feb 10 16:51:08 2006
@@ -3476,7 +3476,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;
}
;
@@ -3488,7 +3488,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.10/mysql-test/r/partition.result Wed Jan 18 14:56:17 2006
+++ 1.11/mysql-test/r/partition.result Fri Feb 10 16:51:08 2006
@@ -278,3 +278,28 @@ partition p1 values in (14)
insert into t1 values (10,1);
ERROR HY000: Table has no partition for value 11
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//
--- 1.11/mysql-test/t/partition.test Wed Jan 18 15:09:00 2006
+++ 1.12/mysql-test/t/partition.test Fri Feb 10 16:51:08 2006
@@ -353,3 +353,38 @@ insert into t1 values (10,1);
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 ;//
| Thread |
|---|
| • bk commit into 5.1 tree (gluh:1.2098) BUG#14363 | gluh | 10 Feb |