Browse Source
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into trift-lap.fambruehe:/MySQL/M51/antony-5.1 mysql-test/suite/funcs_1/include/ndb_tb2.inc: Auto merged mysql-test/suite/funcs_1/r/innodb_views.result: Auto merged mysql-test/suite/funcs_1/r/memory_views.result: Auto merged mysql-test/suite/funcs_1/r/myisam_views.result: Auto merged mysql-test/suite/funcs_1/r/ndb_cursors.result: Auto merged mysql-test/suite/funcs_1/r/ndb_func_view.result: Auto merged mysql-test/suite/funcs_1/r/ndb_storedproc_07.result: Auto merged mysql-test/suite/funcs_1/r/ndb_storedproc_08.result: Auto merged mysql-test/suite/funcs_1/r/ndb_trig_0102.result: Auto merged mysql-test/suite/funcs_1/r/ndb_trig_03.result: Auto merged mysql-test/suite/funcs_1/r/ndb_trig_03e.result: Auto merged mysql-test/suite/funcs_1/r/ndb_trig_0407.result: Auto merged mysql-test/suite/funcs_1/r/ndb_trig_08.result: Auto merged mysql-test/suite/funcs_1/r/ndb_trig_09.result: Auto merged mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result: Auto merged mysql-test/suite/funcs_1/r/ndb_views.result: Auto merged mysql-test/suite/funcs_1/views/views_master.inc: Auto merged sql/ha_partition.h: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged configure.in: Version is updated already. sql/ha_partition.cc: Manual merge of 5.1.22 changes into main.pull/374/head
33 changed files with 2412 additions and 746 deletions
-
4Makefile.am
-
56mysql-test/suite/funcs_1/r/innodb__datadict.result
-
3mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
-
4mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
-
56mysql-test/suite/funcs_1/r/memory__datadict.result
-
3mysql-test/suite/funcs_1/r/memory_storedproc_06.result
-
4mysql-test/suite/funcs_1/r/memory_storedproc_10.result
-
56mysql-test/suite/funcs_1/r/myisam__datadict.result
-
3mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
-
4mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
-
1226mysql-test/suite/funcs_1/r/ndb__datadict.result
-
3mysql-test/suite/funcs_1/r/ndb_storedproc_06.result
-
4mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
-
5mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
-
4mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
-
167mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
-
35mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
-
1043mysql-test/suite/rpl/r/rpl_innodb_bug30919.result
-
1mysql-test/suite/rpl/t/rpl_innodb-master.opt
-
1mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt
-
1mysql-test/suite/rpl/t/rpl_innodb_bug28430-slave.opt
-
154mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
-
66mysql-test/suite/rpl/t/rpl_innodb_bug30888.test
-
1mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt
-
67mysql-test/suite/rpl/t/rpl_innodb_bug30919.test
-
1server-tools/instance-manager/listener.cc
-
2server-tools/instance-manager/listener.h
-
36sql/ha_partition.cc
-
2sql/ha_partition.h
-
2storage/archive/azio.c
-
2storage/archive/azlib.h
-
94storage/innobase/handler/ha_innodb.cc
-
48storage/innobase/row/row0sel.c
1226
mysql-test/suite/funcs_1/r/ndb__datadict.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,167 @@ |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
use test; |
|||
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE='innodb'; |
|||
CREATE TABLE test.bykey_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE='innodb' |
|||
PARTITION BY KEY(id) partitions 5; |
|||
CREATE TABLE test.byrange_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE='innodb' |
|||
PARTITION BY RANGE(id) |
|||
SUBPARTITION BY hash(id) subpartitions 2 |
|||
(PARTITION pa1 values less than (10), |
|||
PARTITION pa2 values less than (20), |
|||
PARTITION pa3 values less than (30), |
|||
PARTITION pa4 values less than (40), |
|||
PARTITION pa5 values less than (50), |
|||
PARTITION pa6 values less than (60), |
|||
PARTITION pa7 values less than (70), |
|||
PARTITION pa8 values less than (80), |
|||
PARTITION pa9 values less than (90), |
|||
PARTITION pa10 values less than (100), |
|||
PARTITION pa11 values less than MAXVALUE); |
|||
CREATE PROCEDURE test.proc_norm() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
SET local_time= NOW(); |
|||
SET cur_user= CURRENT_USER(); |
|||
SET local_uuid= UUID(); |
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
SELECT MAX(id) FROM test.regular_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.regular_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
CREATE PROCEDURE test.proc_bykey() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
SET local_time= NOW(); |
|||
SET cur_user= CURRENT_USER(); |
|||
SET local_uuid= UUID(); |
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.bykey_tbl VALUES (NULL, NOW(), USER() , UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
SELECT MAX(id) FROM test.bykey_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.bykey_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
CREATE PROCEDURE test.proc_byrange() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
SET local_time= NOW(); |
|||
SET cur_user = CURRENT_USER(); |
|||
SET local_uuid=UUID(); |
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.byrange_tbl VALUES (NULL, NOW(), USER(), UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
SELECT MAX(id) FROM test.byrange_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.byrange_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
CALL test.proc_norm(); |
|||
SELECT count(*) as "Master regular" FROM test.regular_tbl; |
|||
Master regular 500 |
|||
CALL test.proc_bykey(); |
|||
SELECT count(*) as "Master bykey" FROM test.bykey_tbl; |
|||
Master bykey 500 |
|||
CALL test.proc_byrange(); |
|||
SELECT count(*) as "Master byrange" FROM test.byrange_tbl; |
|||
Master byrange 500 |
|||
show create table test.byrange_tbl; |
|||
Table byrange_tbl |
|||
Create Table CREATE TABLE `byrange_tbl` ( |
|||
`id` mediumint(9) NOT NULL AUTO_INCREMENT, |
|||
`dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|||
`user` char(255) DEFAULT NULL, |
|||
`uuidf` longblob, |
|||
`fkid` mediumint(9) DEFAULT NULL, |
|||
`filler` varchar(255) DEFAULT NULL, |
|||
PRIMARY KEY (`id`) |
|||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION pa2 VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (30) ENGINE = InnoDB, PARTITION pa4 VALUES LESS THAN (40) ENGINE = InnoDB, PARTITION pa5 VALUES LESS THAN (50) ENGINE = InnoDB, PARTITION pa6 VALUES LESS THAN (60) ENGINE = InnoDB, PARTITION pa7 VALUES LESS THAN (70) ENGINE = InnoDB, PARTITION pa8 VALUES LESS THAN (80) ENGINE = InnoDB, PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ |
|||
show slave status; |
|||
Slave_IO_State Waiting for master to send event |
|||
Master_Host 127.0.0.1 |
|||
Master_User root |
|||
Master_Port MASTER_PORT |
|||
Connect_Retry 1 |
|||
Master_Log_File master-bin.000001 |
|||
Read_Master_Log_Pos 945470 |
|||
Relay_Log_File slave-relay-bin.000003 |
|||
Relay_Log_Pos 945616 |
|||
Relay_Master_Log_File master-bin.000001 |
|||
Slave_IO_Running Yes |
|||
Slave_SQL_Running Yes |
|||
Replicate_Do_DB |
|||
Replicate_Ignore_DB |
|||
Replicate_Do_Table |
|||
Replicate_Ignore_Table |
|||
Replicate_Wild_Do_Table |
|||
Replicate_Wild_Ignore_Table |
|||
Last_Errno 0 |
|||
Last_Error |
|||
Skip_Counter 0 |
|||
Exec_Master_Log_Pos 945470 |
|||
Relay_Log_Space 945771 |
|||
Until_Condition None |
|||
Until_Log_File |
|||
Until_Log_Pos 0 |
|||
Master_SSL_Allowed No |
|||
Master_SSL_CA_File |
|||
Master_SSL_CA_Path |
|||
Master_SSL_Cert |
|||
Master_SSL_Cipher |
|||
Master_SSL_Key |
|||
Seconds_Behind_Master # |
|||
Master_SSL_Verify_Server_Cert No |
|||
Last_IO_Errno 0 |
|||
Last_IO_Error |
|||
Last_SQL_Errno 0 |
|||
Last_SQL_Error |
|||
SELECT count(*) "Slave norm" FROM test.regular_tbl; |
|||
Slave norm 500 |
|||
SELECT count(*) "Slave bykey" FROM test.bykey_tbl; |
|||
Slave bykey 500 |
|||
SELECT count(*) "Slave byrange" FROM test.byrange_tbl; |
|||
Slave byrange 500 |
|||
DROP PROCEDURE test.proc_norm; |
|||
DROP PROCEDURE test.proc_bykey; |
|||
DROP PROCEDURE test.proc_byrange; |
|||
DROP TABLE test.regular_tbl; |
|||
DROP TABLE test.bykey_tbl; |
|||
DROP TABLE test.byrange_tbl; |
|||
@ -0,0 +1,35 @@ |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
use test; |
|||
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE='innodb'; |
|||
CREATE PROCEDURE test.proc_norm() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
SET local_time= NOW(); |
|||
SET cur_user= CURRENT_USER(); |
|||
SET local_uuid= UUID(); |
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
SELECT MAX(id) FROM test.regular_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.regular_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
CALL test.proc_norm(); |
|||
DROP PROCEDURE test.proc_norm; |
|||
DROP TABLE test.regular_tbl; |
|||
1043
mysql-test/suite/rpl/r/rpl_innodb_bug30919.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1 @@ |
|||
--innodb --innodb_autoinc_lock_mode=0 |
|||
@ -0,0 +1 @@ |
|||
--innodb --innodb_autoinc_lock_mode=0 |
|||
@ -0,0 +1 @@ |
|||
--innodb --innodb_autoinc_lock_mode=0 |
|||
@ -0,0 +1,154 @@ |
|||
--source include/have_innodb.inc |
|||
--source include/have_binlog_format_mixed_or_row.inc |
|||
--source include/master-slave.inc |
|||
|
|||
# Set the default connection to 'master' |
|||
|
|||
--vertical_results |
|||
|
|||
let $engine_type= 'innodb'; |
|||
|
|||
######## Creat Table Section ######### |
|||
use test; |
|||
|
|||
eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE=$engine_type; |
|||
|
|||
eval CREATE TABLE test.bykey_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE=$engine_type |
|||
PARTITION BY KEY(id) partitions 5; |
|||
|
|||
eval CREATE TABLE test.byrange_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE=$engine_type |
|||
PARTITION BY RANGE(id) |
|||
SUBPARTITION BY hash(id) subpartitions 2 |
|||
(PARTITION pa1 values less than (10), |
|||
PARTITION pa2 values less than (20), |
|||
PARTITION pa3 values less than (30), |
|||
PARTITION pa4 values less than (40), |
|||
PARTITION pa5 values less than (50), |
|||
PARTITION pa6 values less than (60), |
|||
PARTITION pa7 values less than (70), |
|||
PARTITION pa8 values less than (80), |
|||
PARTITION pa9 values less than (90), |
|||
PARTITION pa10 values less than (100), |
|||
PARTITION pa11 values less than MAXVALUE); |
|||
|
|||
######## Create SPs, Functions, Views and Triggers Section ############## |
|||
|
|||
delimiter |; |
|||
CREATE PROCEDURE test.proc_norm() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
|
|||
SET local_time= NOW(); |
|||
SET cur_user= CURRENT_USER(); |
|||
SET local_uuid= UUID(); |
|||
|
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
|
|||
SELECT MAX(id) FROM test.regular_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.regular_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
|
|||
CREATE PROCEDURE test.proc_bykey() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
|
|||
SET local_time= NOW(); |
|||
SET cur_user= CURRENT_USER(); |
|||
SET local_uuid= UUID(); |
|||
|
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.bykey_tbl VALUES (NULL, NOW(), USER() , UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
|
|||
SELECT MAX(id) FROM test.bykey_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.bykey_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
|
|||
CREATE PROCEDURE test.proc_byrange() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
|
|||
SET local_time= NOW(); |
|||
SET cur_user = CURRENT_USER(); |
|||
SET local_uuid=UUID(); |
|||
|
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.byrange_tbl VALUES (NULL, NOW(), USER(), UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
|
|||
SELECT MAX(id) FROM test.byrange_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.byrange_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
|
|||
delimiter ;| |
|||
|
|||
############ Finish Setup Section ################### |
|||
|
|||
|
|||
############ Test Section ################### |
|||
|
|||
CALL test.proc_norm(); |
|||
SELECT count(*) as "Master regular" FROM test.regular_tbl; |
|||
CALL test.proc_bykey(); |
|||
SELECT count(*) as "Master bykey" FROM test.bykey_tbl; |
|||
CALL test.proc_byrange(); |
|||
SELECT count(*) as "Master byrange" FROM test.byrange_tbl; |
|||
|
|||
--sync_slave_with_master |
|||
connection slave; |
|||
show create table test.byrange_tbl; |
|||
--replace_column 4 MASTER_PORT 33 # |
|||
show slave status; |
|||
SELECT count(*) "Slave norm" FROM test.regular_tbl; |
|||
SELECT count(*) "Slave bykey" FROM test.bykey_tbl; |
|||
SELECT count(*) "Slave byrange" FROM test.byrange_tbl; |
|||
|
|||
###### CLEAN UP SECTION ############## |
|||
|
|||
connection master; |
|||
DROP PROCEDURE test.proc_norm; |
|||
DROP PROCEDURE test.proc_bykey; |
|||
DROP PROCEDURE test.proc_byrange; |
|||
DROP TABLE test.regular_tbl; |
|||
DROP TABLE test.bykey_tbl; |
|||
DROP TABLE test.byrange_tbl; |
|||
|
|||
--source include/master-slave-end.inc |
|||
@ -0,0 +1,66 @@ |
|||
--source include/have_innodb.inc |
|||
--source include/have_binlog_format_mixed_or_row.inc |
|||
--source include/master-slave.inc |
|||
|
|||
# Set the default connection to 'master' |
|||
|
|||
--vertical_results |
|||
|
|||
#let $engine_type= 'myisam'; |
|||
let $engine_type= 'innodb'; |
|||
|
|||
######## Creat Table Section ######### |
|||
use test; |
|||
|
|||
eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE=$engine_type; |
|||
|
|||
######## Create SPs, Functions, Views and Triggers Section ############## |
|||
|
|||
delimiter |; |
|||
CREATE PROCEDURE test.proc_norm() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
|
|||
SET local_time= NOW(); |
|||
SET cur_user= CURRENT_USER(); |
|||
SET local_uuid= UUID(); |
|||
|
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
|
|||
SELECT MAX(id) FROM test.regular_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.regular_tbl WHERE id = del_count; |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
|
|||
delimiter ;| |
|||
|
|||
############ Finish Setup Section ################### |
|||
|
|||
|
|||
############ Test Section ################### |
|||
|
|||
CALL test.proc_norm(); |
|||
|
|||
--sync_slave_with_master |
|||
|
|||
###### CLEAN UP SECTION ############## |
|||
|
|||
connection master; |
|||
DROP PROCEDURE test.proc_norm; |
|||
DROP TABLE test.regular_tbl; |
|||
|
|||
--source include/master-slave-end.inc |
|||
|
|||
@ -0,0 +1 @@ |
|||
--innodb --innodb_autoinc_lock_mode=0 |
|||
@ -0,0 +1,67 @@ |
|||
--source include/have_innodb.inc |
|||
--vertical_results |
|||
let $engine_type= 'innodb'; |
|||
|
|||
######## Creat Table Section ######### |
|||
use test; |
|||
|
|||
eval CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, |
|||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, |
|||
fkid MEDIUMINT, filler VARCHAR(255), |
|||
PRIMARY KEY(id)) ENGINE=$engine_type |
|||
PARTITION BY RANGE(id) |
|||
SUBPARTITION BY hash(id) subpartitions 2 |
|||
(PARTITION pa3 values less than (42), |
|||
PARTITION pa6 values less than (60), |
|||
PARTITION pa7 values less than (70), |
|||
PARTITION pa8 values less than (80), |
|||
PARTITION pa9 values less than (90), |
|||
PARTITION pa10 values less than (100), |
|||
PARTITION pa11 values less than MAXVALUE); |
|||
|
|||
######## Create SPs, Functions, Views and Triggers Section ############## |
|||
|
|||
delimiter |; |
|||
|
|||
CREATE PROCEDURE test.proc_part() |
|||
BEGIN |
|||
DECLARE ins_count INT DEFAULT 1000; |
|||
DECLARE del_count INT; |
|||
DECLARE cur_user VARCHAR(255); |
|||
DECLARE local_uuid VARCHAR(255); |
|||
DECLARE local_time TIMESTAMP; |
|||
|
|||
SET local_time= NOW(); |
|||
SET cur_user= CURRENT_USER(); |
|||
SET local_uuid= UUID(); |
|||
|
|||
WHILE ins_count > 0 DO |
|||
INSERT INTO test.part_tbl VALUES (NULL, NOW(), USER() , UUID(), |
|||
ins_count,'Going to test MBR for MySQL'); |
|||
SET ins_count = ins_count - 1; |
|||
END WHILE; |
|||
SELECT MAX(id) FROM test.part_tbl INTO del_count; |
|||
WHILE del_count > 0 DO |
|||
DELETE FROM test.part_tbl WHERE id = del_count; |
|||
select count(*) as internal_count, del_count -- these two lines are for |
|||
FROM test.part_tbl; -- debug to show the problem |
|||
SET del_count = del_count - 2; |
|||
END WHILE; |
|||
END| |
|||
|
|||
delimiter ;| |
|||
|
|||
############ Finish Setup Section ################### |
|||
|
|||
############ Test Section ################### |
|||
--horizontal_results |
|||
|
|||
CALL test.proc_part(); |
|||
|
|||
select count(*) as Part from test.part_tbl; |
|||
|
|||
###### CLEAN UP SECTION ############## |
|||
|
|||
DROP PROCEDURE test.proc_part; |
|||
DROP TABLE test.part_tbl; |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue