mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	BitKeeper/etc/ignore: Added mysql-test/suite/funcs_1/r/innodb_views.warnings mysql-test/suite/funcs_1/r/memory_trig_03e.warnings mysql-test/suite/funcs_1/r/memory_views.warnings mysql-test/suite/funcs_1/r/myisam_trig_03e.warnings mysql-test/suite/funcs_1/r/myisam_views.warnings mysql-test/suite/funcs_1/r/ndb_trig_03e.warnings mysql-test/suite/funcs_1/r/ndb_views.warnings mysql-test/suite/partitions/r/diff mysql-test/suite/partitions/r/partition_bit_ndb.warnings mysql-test/suite/partitions/r/partition_special_innodb.warnings mysql-test/suite/partitions/r/partition_special_myisam.warnings storage/archive/archive_reader mysql-test/suite/funcs_1/r/innodb_trig_03e.warnings to the ignore list mysql-test/suite/funcs_2/include/check_charset.inc: inserted newline at the end of file. mysql-test/suite/objects/include/drop_all.inc: inserted newline at the end of file. mysql-test/suite/partitions/include/partition_key_32col.inc: inserted newline at the end of file. mysql-test/suite/rpl/data/rpl_mixed.dat: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_event.inc: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_select.inc: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_user.inc: inserted newline at the end of file. mysql-test/suite/rpl/include/rpl_mixed_check_view.inc: inserted newline at the end of file.
		
			
				
	
	
		
			116 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			116 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
--disable_query_log
 | 
						|
# DATA DIRECTORY
 | 
						|
eval SET @data_dir = 'DATA DIRECTORY =
 | 
						|
''/tmp''';
 | 
						|
let $data_directory = `select @data_dir`;
 | 
						|
 | 
						|
#INDEX DIRECTORY
 | 
						|
eval SET @indx_dir = 'INDEX DIRECTORY =
 | 
						|
''/tmp''';
 | 
						|
let $index_directory = `select @indx_dir`;
 | 
						|
--enable_query_log
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
drop table if exists t1;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
--error 1439
 | 
						|
eval create table t1 (a bit(65), primary key (a)) engine=$engine partition by key (a);
 | 
						|
 | 
						|
eval create table t1 (a bit(0), primary key (a)) engine=$engine partition by key (a);
 | 
						|
show create table t1;
 | 
						|
drop table t1;
 | 
						|
 | 
						|
eval create table t1 (a bit(0), primary key (a)) engine=$engine 
 | 
						|
partition by key (a) (
 | 
						|
partition pa1 $data_directory $index_directory,
 | 
						|
partition pa2 $data_directory $index_directory);
 | 
						|
show create table t1;
 | 
						|
drop table t1;
 | 
						|
 | 
						|
eval create table t1 (a bit(64), primary key (a)) engine=$engine 
 | 
						|
partition by key (a) partitions 2;
 | 
						|
show create table t1;
 | 
						|
insert into t1 values 
 | 
						|
(b'1111111111111111111111111111111111111111111111111111111111111111'),
 | 
						|
(b'1000000000000000000000000000000000000000000000000000000000000000'),
 | 
						|
(b'0000000000000000000000000000000000000000000000000000000000000001'),
 | 
						|
(b'1010101010101010101010101010101010101010101010101010101010101010'),
 | 
						|
(b'0101010101010101010101010101010101010101010101010101010101010101');
 | 
						|
select hex(a) from t1;
 | 
						|
drop table t1;
 | 
						|
 | 
						|
eval create table t1 (a bit(64), primary key (a)) engine=$engine 
 | 
						|
partition by key (a) (
 | 
						|
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
 | 
						|
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
 | 
						|
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
 | 
						|
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
 | 
						|
show create table t1;
 | 
						|
insert into t1 values 
 | 
						|
(b'1111111111111111111111111111111111111111111111111111111111111111'),
 | 
						|
(b'1000000000000000000000000000000000000000000000000000000000000000'),
 | 
						|
(b'0000000000000000000000000000000000000000000000000000000000000001'),
 | 
						|
(b'1010101010101010101010101010101010101010101010101010101010101010'),
 | 
						|
(b'0101010101010101010101010101010101010101010101010101010101010101');
 | 
						|
select hex(a) from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
 | 
						|
delete from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
 | 
						|
select hex(a) from t1;
 | 
						|
drop table t1;
 | 
						|
 | 
						|
eval create table t2 (a bit, primary key (a)) engine=$engine 
 | 
						|
partition by key (a) partitions 4;
 | 
						|
show create table t2;
 | 
						|
insert into t2 values (b'0'), (b'1');
 | 
						|
select hex(a) from t2;
 | 
						|
alter table t2 drop primary key;
 | 
						|
show create table t2;
 | 
						|
select hex(a) from t2;
 | 
						|
alter table t2 add primary key (a);
 | 
						|
show create table t2;
 | 
						|
select hex(a) from t2;
 | 
						|
drop table t2;
 | 
						|
 | 
						|
eval create table t3 (a bit(8), primary key (a)) engine=$engine 
 | 
						|
partition by range (a) subpartition by key (a) subpartitions 2 (
 | 
						|
partition pa1 values less than (3),
 | 
						|
partition pa2 values less than (16),
 | 
						|
partition pa3 values less than (64),
 | 
						|
partition pa4 values less than (256));
 | 
						|
show create table t3;
 | 
						|
let $count=255;
 | 
						|
--echo $count inserts;
 | 
						|
--disable_query_log
 | 
						|
while ($count)
 | 
						|
{
 | 
						|
eval insert into t3 values ($count);
 | 
						|
dec $count;
 | 
						|
}
 | 
						|
--enable_query_log
 | 
						|
select hex(a) from t3 where a=b'01010101';
 | 
						|
delete from t3 where a=b'01010101';
 | 
						|
select count(*) from t3;
 | 
						|
select hex(a) from t3;
 | 
						|
drop table t3;
 | 
						|
 | 
						|
eval create table t4 (a bit(8), primary key (a)) engine=$engine 
 | 
						|
partition by list (a) subpartition by key (a) subpartitions 2 (
 | 
						|
partition pa1 values in (0,1,2,3),
 | 
						|
partition pa2 values in (4,5,6,7,8,9,10,11,12,13,14,15,16),
 | 
						|
partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
 | 
						|
show create table t4;
 | 
						|
let $count=32;
 | 
						|
--echo $count inserts;
 | 
						|
--disable_query_log
 | 
						|
while ($count)
 | 
						|
{
 | 
						|
eval insert into t4 values ($count);
 | 
						|
dec $count;
 | 
						|
}
 | 
						|
--enable_query_log
 | 
						|
select hex(a) from t4 where a=b'00000001';
 | 
						|
delete from t4 where a=b'00000001';
 | 
						|
select count(*) from t4;
 | 
						|
select hex(a) from t4;
 | 
						|
drop table t4;
 |