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
5009ab85
Commit
5009ab85
authored
May 19, 2010
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport test cases for Bug#46198 and Bug#38054
from 6.0 to trunk-bugfixing.
parent
f11008ba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
0 deletions
+82
-0
mysql-test/r/partition.result
mysql-test/r/partition.result
+20
-0
mysql-test/r/variables_debug.result
mysql-test/r/variables_debug.result
+7
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+45
-0
mysql-test/t/variables_debug.test
mysql-test/t/variables_debug.test
+10
-0
No files found.
mysql-test/r/partition.result
View file @
5009ab85
...
...
@@ -2111,4 +2111,24 @@ COUNT(*)
0
DROP TABLE t1;
SET SESSION SQL_MODE=DEFAULT;
#
# Bug#46198: Hang after failed ALTER TABLE on partitioned table.
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (s1 INT PRIMARY KEY) PARTITION BY HASH(s1);
LOCK TABLES t1 WRITE, t1 b READ;
UNLOCK TABLES;
ALTER TABLE t1 DROP PARTITION p1;
ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions
SELECT * FROM t1;
s1
DROP TABLE t1;
CREATE TABLE t1 (s1 VARCHAR(5) PRIMARY KEY) PARTITION BY KEY(s1);
LOCK TABLES t1 WRITE, t1 b READ;
UNLOCK TABLES;
ALTER TABLE t1 ADD COLUMN (s3 VARCHAR(5) UNIQUE);
ERROR HY000: A UNIQUE INDEX must include all columns in the table's partitioning function
SELECT * FROM t1;
s1
DROP TABLE t1;
End of 5.1 tests
mysql-test/r/variables_debug.result
View file @
5009ab85
...
...
@@ -10,3 +10,10 @@ set debug= '-P';
select @@debug;
@@debug
T
SELECT @@session.debug, @@global.debug;
@@session.debug @@global.debug
T
SET SESSION debug = '';
SELECT @@session.debug, @@global.debug;
@@session.debug @@global.debug
mysql-test/t/partition.test
View file @
5009ab85
...
...
@@ -2118,4 +2118,49 @@ SET SESSION SQL_MODE=DEFAULT;
#SELECT 1 FROM t1 JOIN t1 AS t2 USING (a) FOR UPDATE;
#
#DROP TABLE t1;
--
echo
#
--
echo
# Bug#46198: Hang after failed ALTER TABLE on partitioned table.
--
echo
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
#
# Case 1.
#
CREATE
TABLE
t1
(
s1
INT
PRIMARY
KEY
)
PARTITION
BY
HASH
(
s1
);
LOCK
TABLES
t1
WRITE
,
t1
b
READ
;
UNLOCK
TABLES
;
--
error
ER_ONLY_ON_RANGE_LIST_PARTITION
ALTER
TABLE
t1
DROP
PARTITION
p1
;
# The SELECT below used to hang in tdc_wait_for_old_versions().
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Case 2.
#
CREATE
TABLE
t1
(
s1
VARCHAR
(
5
)
PRIMARY
KEY
)
PARTITION
BY
KEY
(
s1
);
LOCK
TABLES
t1
WRITE
,
t1
b
READ
;
UNLOCK
TABLES
;
--
error
ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
ALTER
TABLE
t1
ADD
COLUMN
(
s3
VARCHAR
(
5
)
UNIQUE
);
# The SELECT below used to hang in tdc_wait_for_old_versions().
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
mysql-test/t/variables_debug.test
View file @
5009ab85
...
...
@@ -10,3 +10,13 @@ set debug= '+P';
select
@@
debug
;
set
debug
=
'-P'
;
select
@@
debug
;
#
# Bug#38054: "SET SESSION debug" modifies @@global.debug variable
#
SELECT
@@
session
.
debug
,
@@
global
.
debug
;
SET
SESSION
debug
=
''
;
SELECT
@@
session
.
debug
,
@@
global
.
debug
;
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