mirror of
https://github.com/MariaDB/server.git
synced 2025-11-16 20:23:18 +03:00
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into rurik.mysql.com:/home/igor/mysql-5.1
This commit is contained in:
@@ -27,9 +27,10 @@ EXTRA_DIST = $(EXTRA_SCRIPTS)
|
||||
GENSCRIPTS = mysql-test-run install_test_db
|
||||
PRESCRIPTS = mysql-test-run.pl
|
||||
test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS)
|
||||
test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem \
|
||||
std_data/server-cert.pem std_data/server-key.pem
|
||||
CLEANFILES = $(GENSCRIPTS) $(test_DATA)
|
||||
test_DATA = std_data/client-key.pem std_data/client-cert.pem \
|
||||
std_data/cacert.pem std_data/server-cert.pem \
|
||||
std_data/server-key.pem
|
||||
CLEANFILES = $(GENSCRIPTS)
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I..
|
||||
|
||||
|
||||
@@ -502,7 +502,9 @@ sub initial_setup () {
|
||||
chomp($glob_cygwin_shell);
|
||||
}
|
||||
$glob_basedir= dirname($glob_mysql_test_dir);
|
||||
$glob_mysql_bench_dir= "$glob_basedir/mysql-bench"; # FIXME make configurable
|
||||
# Expect mysql-bench to be located adjacent to the source tree, by default
|
||||
$glob_mysql_bench_dir= "$glob_basedir/../mysql-bench"
|
||||
unless defined $glob_mysql_bench_dir;
|
||||
|
||||
# needs to be same length to test logging (FIXME what???)
|
||||
$path_slave_load_tmpdir= "../../var/tmp";
|
||||
@@ -664,6 +666,7 @@ sub command_line_setup () {
|
||||
# Directories
|
||||
'tmpdir=s' => \$opt_tmpdir,
|
||||
'vardir=s' => \$opt_vardir,
|
||||
'benchdir=s' => \$glob_mysql_bench_dir,
|
||||
|
||||
# Misc
|
||||
'comment=s' => \$opt_comment,
|
||||
@@ -1682,8 +1685,8 @@ sub run_benchmarks ($) {
|
||||
mtr_add_arg($args, "--create-options=TYPE=ndb");
|
||||
}
|
||||
|
||||
my $benchdir= "$glob_basedir/sql-bench";
|
||||
chdir($benchdir); # FIXME check error
|
||||
chdir($glob_mysql_bench_dir)
|
||||
or mtr_error("Couldn't chdir to '$glob_mysql_bench_dir': $!");
|
||||
|
||||
# FIXME write shorter....
|
||||
|
||||
|
||||
@@ -13809,4 +13809,11 @@ alter table t1 add unique key (i, v);
|
||||
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
|
||||
i v
|
||||
4 3r4f
|
||||
alter table t1 data directory="$MYSQLTEST_VARDIR/tmp";
|
||||
select * from t1;
|
||||
i v
|
||||
1 def
|
||||
2 abc
|
||||
4 3r4f
|
||||
5 lmn
|
||||
drop table t1, t2, t4, t5;
|
||||
|
||||
@@ -1640,6 +1640,30 @@ t2 CREATE TABLE `t2` (
|
||||
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t2, t1;
|
||||
flush status;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 0
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 0
|
||||
create table t1 (a int) engine=innodb;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 1
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
begin;
|
||||
delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 2
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
drop table t1;
|
||||
create table t1 (c char(10), index (c,c)) engine=innodb;
|
||||
ERROR 42S21: Duplicate column name 'c'
|
||||
create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
|
||||
@@ -1751,6 +1775,21 @@ select count(*) from t1 where x = 18446744073709551601;
|
||||
count(*)
|
||||
1
|
||||
drop table t1;
|
||||
show status like "Innodb_buffer_pool_pages_total";
|
||||
Variable_name Value
|
||||
Innodb_buffer_pool_pages_total 512
|
||||
show status like "Innodb_page_size";
|
||||
Variable_name Value
|
||||
Innodb_page_size 16384
|
||||
show status like "Innodb_rows_deleted";
|
||||
Variable_name Value
|
||||
Innodb_rows_deleted 2070
|
||||
show status like "Innodb_rows_inserted";
|
||||
Variable_name Value
|
||||
Innodb_rows_inserted 31727
|
||||
show status like "Innodb_rows_updated";
|
||||
Variable_name Value
|
||||
Innodb_rows_updated 29530
|
||||
show status like "Innodb_row_lock_waits";
|
||||
Variable_name Value
|
||||
Innodb_row_lock_waits 0
|
||||
|
||||
@@ -72,7 +72,16 @@ c_cp932
|
||||
+----------------------+------------+--------+
|
||||
| concat('>',col1,'<') | col2 | col3 |
|
||||
+----------------------+------------+--------+
|
||||
| >a < | b | 123421 |
|
||||
| >a < | 0123456789 | 4 |
|
||||
| >abcd< | | 4 |
|
||||
| >a < | b | 123421 |
|
||||
| >a < | 0123456789 | 4 |
|
||||
| >abcd< | NULL | 4 |
|
||||
+----------------------+------------+--------+
|
||||
+------+------+---------------------------+
|
||||
| i | j | k |
|
||||
+------+------+---------------------------+
|
||||
| 1 | NULL | NULL |
|
||||
| NULL | NULL | <-----------------------> |
|
||||
| NULL | NULL | <----- |
|
||||
| NULL | NULL | Τη γλώσσα |
|
||||
| NULL | NULL | ᛖᚴ ᚷᛖᛏ |
|
||||
+------+------+---------------------------+
|
||||
|
||||
104
mysql-test/r/ndb_blob_partition.result
Normal file
104
mysql-test/r/ndb_blob_partition.result
Normal file
@@ -0,0 +1,104 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (
|
||||
a mediumint not null,
|
||||
b text not null,
|
||||
c int not null,
|
||||
d longblob,
|
||||
primary key using hash (a,c),
|
||||
unique key (c)
|
||||
)
|
||||
engine=ndb
|
||||
partition by range (c)
|
||||
partitions 3
|
||||
( partition p1 values less than (200),
|
||||
partition p2 values less than (300),
|
||||
partition p3 values less than (400));
|
||||
insert into t1 values (1, @v1, 101, @v2);
|
||||
insert into t1 values (1, @v2, 102, @v3);
|
||||
insert into t1 values (1, @v3, 103, @v4);
|
||||
insert into t1 values (2, @v4, 201, @v5);
|
||||
insert into t1 values (2, @v5, 202, @v6);
|
||||
insert into t1 values (2, @v6, 203, @v7);
|
||||
insert into t1 values (3, @v7, 301, @v8);
|
||||
insert into t1 values (3, @v8, 302, @v9);
|
||||
insert into t1 values (3, @v9, 303, @v1);
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
a sha1(b) c sha1(d)
|
||||
1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6
|
||||
1 10d3c783026b310218d10b7188da96a2401648c6 102 a33549d9844092289a58ac348dd59f09fc28406a
|
||||
1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
|
||||
2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e
|
||||
2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5
|
||||
3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
3 acbaba01bc2e682f015f40e79d9cbe475db3002e 302 9ee30d99162574f79c66ae95cdf132dcf9cbc259
|
||||
3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4
|
||||
select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101;
|
||||
a sha1(b) c sha1(d)
|
||||
1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6
|
||||
select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201;
|
||||
a sha1(b) c sha1(d)
|
||||
2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301;
|
||||
a sha1(b) c sha1(d)
|
||||
3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
update t1 set b = @v3, d = @v4 where a = 1 and c = 102;
|
||||
update t1 set b = @v6, d = @v7 where a = 2 and c = 202;
|
||||
update t1 set b = @v9, d = @v1 where a = 3 and c = 302;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
a sha1(b) c sha1(d)
|
||||
1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6
|
||||
1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
|
||||
1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
|
||||
2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5
|
||||
2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5
|
||||
3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4
|
||||
3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4
|
||||
update t1 set b = @v4, d = @v5 where c = 103;
|
||||
update t1 set b = @v7, d = @v8 where c = 203;
|
||||
update t1 set b = @v1, d = @v2 where c = 303;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
a sha1(b) c sha1(d)
|
||||
1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6
|
||||
1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
|
||||
1 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 103 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5
|
||||
2 1e0070bec426871a46291de27b9bd6e4255ab4e5 203 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4
|
||||
3 1d42dd9090cf78314a06665d4ea938c35cc760f4 303 10d3c783026b310218d10b7188da96a2401648c6
|
||||
update t1 set b = @v5, d = @v6;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
a sha1(b) c sha1(d)
|
||||
1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 101 090565c580809efed3d369481a4bbb168b20713e
|
||||
1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 102 090565c580809efed3d369481a4bbb168b20713e
|
||||
1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 103 090565c580809efed3d369481a4bbb168b20713e
|
||||
2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 201 090565c580809efed3d369481a4bbb168b20713e
|
||||
2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e
|
||||
2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 203 090565c580809efed3d369481a4bbb168b20713e
|
||||
3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 301 090565c580809efed3d369481a4bbb168b20713e
|
||||
3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 302 090565c580809efed3d369481a4bbb168b20713e
|
||||
3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 303 090565c580809efed3d369481a4bbb168b20713e
|
||||
update t1 set b = @v1, d = @v2 where 100 < c and c < 200;
|
||||
update t1 set b = @v4, d = @v5 where 200 < c and c < 300;
|
||||
update t1 set b = @v7, d = @v8 where 300 < c and c < 400;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
a sha1(b) c sha1(d)
|
||||
1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6
|
||||
1 1d42dd9090cf78314a06665d4ea938c35cc760f4 102 10d3c783026b310218d10b7188da96a2401648c6
|
||||
1 1d42dd9090cf78314a06665d4ea938c35cc760f4 103 10d3c783026b310218d10b7188da96a2401648c6
|
||||
2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 202 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 203 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
3 1e0070bec426871a46291de27b9bd6e4255ab4e5 302 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
3 1e0070bec426871a46291de27b9bd6e4255ab4e5 303 acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
delete from t1 where a = 1 and c = 101;
|
||||
delete from t1 where c = 102;
|
||||
delete from t1;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
a sha1(b) c sha1(d)
|
||||
drop table t1;
|
||||
@@ -865,6 +865,10 @@ t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (NULL) ENGINE = MyISAM)
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int)
|
||||
PARTITION BY RANGE(a)
|
||||
(PARTITION p0 VALUES LESS THAN (NULL));
|
||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '))' at line 3
|
||||
create table t1 (s1 int auto_increment primary key)
|
||||
partition by list (s1)
|
||||
(partition p1 values in (1),
|
||||
|
||||
@@ -1486,6 +1486,9 @@ select * from t1;
|
||||
alter table t1 add unique key (i, v);
|
||||
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
|
||||
|
||||
alter table t1 data directory="$MYSQLTEST_VARDIR/tmp";
|
||||
select * from t1;
|
||||
|
||||
#
|
||||
# Cleanup, test is over
|
||||
#
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
events_bugs : BUG#17619 2006-02-21 andrey Test case unstable (race conditions)
|
||||
events_stress : BUG#17619 2006-02-21 andrey Test case unstable
|
||||
events : BUG#17619 2006-02-21 andrey Test case unstable
|
||||
events_bugs : BUG#17619 2006-02-21 andrey Race conditions
|
||||
events_stress : BUG#17619 2006-02-21 andrey Race conditions
|
||||
events : BUG#17619 2006-02-21 andrey Race conditions
|
||||
events_scheduling : BUG#18958 2006-04-13 andrey Test case unstable
|
||||
events_logs_tests : BUG#18953 2006-04-12 kent Test is randomly failing
|
||||
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
@@ -31,6 +32,7 @@ rpl_ndb_relay_space : BUG#16993 2006-02-16 jmiller RBR: ALTER TABLE ZEROFIL
|
||||
rpl_switch_stm_row_mixed : BUG#18590 2006-03-28 brian
|
||||
rpl_row_basic_7ndb : BUG#17400 2006-04-09 brian Cluster Replication: delete & update of rows in table without pk fails on slave.
|
||||
rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
|
||||
rpl_row_func003 : BUG#19074 2006-13-04 andrei test failed
|
||||
rpl_row_inexist_tbl : BUG#18948 2006-03-09 mats Disabled since patch makes this test wait forever
|
||||
rpl_sp : BUG#16456 2006-02-16 jmiller
|
||||
rpl_until : BUG#15886 2006-02-16 jmiller Unstable test case
|
||||
|
||||
@@ -1141,6 +1141,41 @@ show create table t2;
|
||||
drop table t2, t1;
|
||||
|
||||
|
||||
#
|
||||
# Let us test binlog_cache_use and binlog_cache_disk_use status vars.
|
||||
# Actually this test has nothing to do with innodb per se, it just requires
|
||||
# transactional table.
|
||||
#
|
||||
flush status;
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
create table t1 (a int) engine=innodb;
|
||||
|
||||
# Now we are going to create transaction which is long enough so its
|
||||
# transaction binlog will be flushed to disk...
|
||||
let $1=2000;
|
||||
disable_query_log;
|
||||
begin;
|
||||
while ($1)
|
||||
{
|
||||
eval insert into t1 values( $1 );
|
||||
dec $1;
|
||||
}
|
||||
commit;
|
||||
enable_query_log;
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
# Transaction which should not be flushed to disk and so should not
|
||||
# increase binlog_cache_disk_use.
|
||||
begin;
|
||||
delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #6126: Duplicate columns in keys gives misleading error message
|
||||
#
|
||||
@@ -1255,6 +1290,15 @@ select * from t1 where x > -16;
|
||||
select count(*) from t1 where x = 18446744073709551601;
|
||||
drop table t1;
|
||||
|
||||
|
||||
# Test for testable InnoDB status variables. This test
|
||||
# uses previous ones(pages_created, rows_deleted, ...).
|
||||
show status like "Innodb_buffer_pool_pages_total";
|
||||
show status like "Innodb_page_size";
|
||||
show status like "Innodb_rows_deleted";
|
||||
show status like "Innodb_rows_inserted";
|
||||
show status like "Innodb_rows_updated";
|
||||
|
||||
# Test for row locks InnoDB status variables.
|
||||
show status like "Innodb_row_lock_waits";
|
||||
show status like "Innodb_row_lock_current_waits";
|
||||
|
||||
@@ -61,3 +61,9 @@ drop table t1;
|
||||
# Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string".
|
||||
#
|
||||
--exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1
|
||||
|
||||
#
|
||||
# Bug#18265 -- mysql client: No longer right-justifies numeric columns
|
||||
#
|
||||
--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int, k char(25) charset utf8); insert into t1 (i) values (1); insert into t1 (k) values ('<----------------------->'); insert into t1 (k) values ('<-----'); insert into t1 (k) values ('Τη γλώσσα'); insert into t1 (k) values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;"
|
||||
|
||||
|
||||
93
mysql-test/t/ndb_blob_partition.test
Normal file
93
mysql-test/t/ndb_blob_partition.test
Normal file
@@ -0,0 +1,93 @@
|
||||
--source include/have_ndb.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Minimal NDB blobs test with range partitions.
|
||||
#
|
||||
|
||||
create table t1 (
|
||||
a mediumint not null,
|
||||
b text not null,
|
||||
c int not null,
|
||||
d longblob,
|
||||
primary key using hash (a,c),
|
||||
unique key (c)
|
||||
)
|
||||
engine=ndb
|
||||
partition by range (c)
|
||||
partitions 3
|
||||
( partition p1 values less than (200),
|
||||
partition p2 values less than (300),
|
||||
partition p3 values less than (400));
|
||||
|
||||
--disable_query_log
|
||||
sleep 1;
|
||||
|
||||
# length 61
|
||||
set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau';
|
||||
set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz';
|
||||
set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah';
|
||||
|
||||
set @v1 = repeat(@s0, 100); -- 1d42dd9090cf78314a06665d4ea938c35cc760f4
|
||||
set @v2 = repeat(@s1, 200); -- 10d3c783026b310218d10b7188da96a2401648c6
|
||||
set @v3 = repeat(@s2, 300); -- a33549d9844092289a58ac348dd59f09fc28406a
|
||||
set @v4 = repeat(@s0, 400); -- daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
|
||||
set @v5 = repeat(@s1, 500); -- 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
||||
set @v6 = repeat(@s2, 600); -- 090565c580809efed3d369481a4bbb168b20713e
|
||||
set @v7 = repeat(@s0, 700); -- 1e0070bec426871a46291de27b9bd6e4255ab4e5
|
||||
set @v8 = repeat(@s1, 800); -- acbaba01bc2e682f015f40e79d9cbe475db3002e
|
||||
set @v9 = repeat(@s2, 900); -- 9ee30d99162574f79c66ae95cdf132dcf9cbc259
|
||||
--enable_query_log
|
||||
|
||||
# -- insert --
|
||||
insert into t1 values (1, @v1, 101, @v2);
|
||||
insert into t1 values (1, @v2, 102, @v3);
|
||||
insert into t1 values (1, @v3, 103, @v4);
|
||||
insert into t1 values (2, @v4, 201, @v5);
|
||||
insert into t1 values (2, @v5, 202, @v6);
|
||||
insert into t1 values (2, @v6, 203, @v7);
|
||||
insert into t1 values (3, @v7, 301, @v8);
|
||||
insert into t1 values (3, @v8, 302, @v9);
|
||||
insert into t1 values (3, @v9, 303, @v1);
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
|
||||
# -- pk read --
|
||||
select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101;
|
||||
select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201;
|
||||
select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301;
|
||||
|
||||
# -- pk update --
|
||||
update t1 set b = @v3, d = @v4 where a = 1 and c = 102;
|
||||
update t1 set b = @v6, d = @v7 where a = 2 and c = 202;
|
||||
update t1 set b = @v9, d = @v1 where a = 3 and c = 302;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
|
||||
# -- hash index update --
|
||||
update t1 set b = @v4, d = @v5 where c = 103;
|
||||
update t1 set b = @v7, d = @v8 where c = 203;
|
||||
update t1 set b = @v1, d = @v2 where c = 303;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
|
||||
# -- full scan update --
|
||||
update t1 set b = @v5, d = @v6;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
|
||||
# -- range scan update
|
||||
update t1 set b = @v1, d = @v2 where 100 < c and c < 200;
|
||||
update t1 set b = @v4, d = @v5 where 200 < c and c < 300;
|
||||
update t1 set b = @v7, d = @v8 where 300 < c and c < 400;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
|
||||
# -- delete --
|
||||
delete from t1 where a = 1 and c = 101;
|
||||
delete from t1 where c = 102;
|
||||
# delete from t1 where c < 300; # XXX coredump
|
||||
delete from t1;
|
||||
select a, sha1(b), c, sha1(d) from t1 order by a;
|
||||
|
||||
# -- clean up --
|
||||
drop table t1;
|
||||
@@ -989,6 +989,11 @@ PARTITION BY LIST (a)
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--error 1064
|
||||
CREATE TABLE t1 (a int)
|
||||
PARTITION BY RANGE(a)
|
||||
(PARTITION p0 VALUES LESS THAN (NULL));
|
||||
|
||||
#
|
||||
# Bug#18753 Partitions: auto_increment fails
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user