-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mysql-8.0' into mysql-trunk
- Loading branch information
Showing
3 changed files
with
120 additions
and
7 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
mysql-test/suite/innodb/r/instant_add_column_autoinc.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
CREATE PROCEDURE test.sp2 (IN start BIGINT) | ||
BEGIN | ||
SET @idx =start; | ||
WHILE (@idx > 0) DO | ||
ALTER TABLE test.t1 ADD n2 BIGINT; | ||
ALTER TABLE test.t1 DROP COLUMN n2; | ||
SET @idx = @idx - 1; | ||
END WHILE; | ||
END| | ||
CREATE PROCEDURE test.sp1 (IN start BIGINT) | ||
BEGIN | ||
SET @idx =start; | ||
WHILE (@idx > 0) DO | ||
INSERT INTO test.t1 (c2,c3) VALUES(repeat('q',10),@idx); | ||
SET @idx = @idx - 1; | ||
END WHILE; | ||
END| | ||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY, c2 TEXT(1024), c3 INT); | ||
call test.sp2(30);; | ||
call test.sp1(300);; | ||
CHECK TABLE t1; | ||
Table Op Msg_type Msg_text | ||
test.t1 check status OK | ||
DROP TABLE t1; | ||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY, c2 TEXT(1024), c3 INT) PARTITION BY HASH (c1) PARTITIONS 2; | ||
call test.sp2(30);; | ||
call test.sp1(300);; | ||
CHECK TABLE t1; | ||
Table Op Msg_type Msg_text | ||
test.t1 check status OK | ||
DROP PROCEDURE IF EXISTS test.sp1; | ||
DROP PROCEDURE IF EXISTS test.sp2; | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--source include/count_sessions.inc | ||
|
||
delimiter |; | ||
#Procedure for alter(DDL) | ||
CREATE PROCEDURE test.sp2 (IN start BIGINT) | ||
BEGIN | ||
SET @idx =start; | ||
WHILE (@idx > 0) DO | ||
ALTER TABLE test.t1 ADD n2 BIGINT; | ||
ALTER TABLE test.t1 DROP COLUMN n2; | ||
SET @idx = @idx - 1; | ||
END WHILE; | ||
END| | ||
|
||
#Procedure for INSERT | ||
CREATE PROCEDURE test.sp1 (IN start BIGINT) | ||
BEGIN | ||
SET @idx =start; | ||
WHILE (@idx > 0) DO | ||
INSERT INTO test.t1 (c2,c3) VALUES(repeat('q',10),@idx); | ||
SET @idx = @idx - 1; | ||
END WHILE; | ||
END| | ||
|
||
delimiter ;| | ||
|
||
|
||
connect (con1,localhost,root,,); | ||
|
||
connection default; | ||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY, c2 TEXT(1024), c3 INT); | ||
--send call test.sp2(30); | ||
|
||
connection con1; | ||
--send call test.sp1(300); | ||
--reap | ||
|
||
connection default; | ||
--reap | ||
|
||
CHECK TABLE t1; | ||
DROP TABLE t1; | ||
|
||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY, c2 TEXT(1024), c3 INT) PARTITION BY HASH (c1) PARTITIONS 2; | ||
--send call test.sp2(30); | ||
|
||
connection con1; | ||
--send call test.sp1(300); | ||
--reap | ||
|
||
connection default; | ||
--reap | ||
|
||
CHECK TABLE t1; | ||
|
||
disconnect con1; | ||
|
||
DROP PROCEDURE IF EXISTS test.sp1; | ||
DROP PROCEDURE IF EXISTS test.sp2; | ||
|
||
DROP TABLE t1; | ||
|
||
--source include/wait_until_count_sessions.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters