Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5d895630
Commit
5d895630
authored
Mar 01, 2006
by
gluh@eagle.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug#14363 Partitions: failure if create in stored procedure
store copy of partition function string
parent
701110c9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
2 deletions
+62
-2
mysql-test/r/partition.result
mysql-test/r/partition.result
+25
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+35
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
mysql-test/r/partition.result
View file @
5d895630
...
@@ -348,4 +348,29 @@ INSERT INTO t1 SET f_int1 = 2, f_int2 = 2, f_char1 = '2', f_char2 = '2', f_charb
...
@@ -348,4 +348,29 @@ INSERT INTO t1 SET f_int1 = 2, f_int2 = 2, f_char1 = '2', f_char2 = '2', f_charb
SELECT * FROM t1 WHERE f_int1 IS NULL;
SELECT * FROM t1 WHERE f_int1 IS NULL;
f_int1 f_int2 f_char1 f_char2 f_charbig
f_int1 f_int2 f_char1 f_char2 f_charbig
drop table t1;
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
End of 5.1 tests
mysql-test/t/partition.test
View file @
5d895630
...
@@ -448,4 +448,39 @@ INSERT INTO t1 SET f_int1 = 2, f_int2 = 2, f_char1 = '2', f_char2 = '2', f_charb
...
@@ -448,4 +448,39 @@ INSERT INTO t1 SET f_int1 = 2, f_int2 = 2, f_char1 = '2', f_char2 = '2', f_charb
SELECT
*
FROM
t1
WHERE
f_int1
IS
NULL
;
SELECT
*
FROM
t1
WHERE
f_int1
IS
NULL
;
drop
table
t1
;
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
--
echo
End
of
5.1
tests
sql/sql_yacc.yy
View file @
5d895630
...
@@ -3489,7 +3489,7 @@ part_func:
...
@@ -3489,7 +3489,7 @@ part_func:
uint expr_len= (uint)($4 - $2) - 1;
uint expr_len= (uint)($4 - $2) - 1;
lex->part_info->list_of_part_fields= FALSE;
lex->part_info->list_of_part_fields= FALSE;
lex->part_info->part_expr= $3;
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;
lex->part_info->part_func_len= expr_len;
}
}
;
;
...
@@ -3501,7 +3501,7 @@ sub_part_func:
...
@@ -3501,7 +3501,7 @@ sub_part_func:
uint expr_len= (uint)($4 - $2) - 1;
uint expr_len= (uint)($4 - $2) - 1;
lex->part_info->list_of_subpart_fields= FALSE;
lex->part_info->list_of_subpart_fields= FALSE;
lex->part_info->subpart_expr= $3;
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;
lex->part_info->subpart_func_len= expr_len;
}
}
;
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment