mariadb/mysql-test/suite/parts/t/partition_sessions.test
unknown 3df9f94f35 shorten filenames
mysql-test/suite/parts/r/ndb_blob_partition.result:
  Rename: mysql-test/suite/partitions/r/ndb_blob_partition.result -> mysql-test/suite/parts/r/ndb_blob_partition.result
mysql-test/suite/parts/r/ndb_dd_backuprestore.result:
  Rename: mysql-test/suite/partitions/r/ndb_dd_backuprestore.result -> mysql-test/suite/parts/r/ndb_dd_backuprestore.result
mysql-test/suite/parts/r/ndb_partition_error.result:
  Rename: mysql-test/suite/partitions/r/ndb_partition_error.result -> mysql-test/suite/parts/r/ndb_partition_error.result
mysql-test/suite/parts/r/ndb_partition_list.result:
  Rename: mysql-test/suite/partitions/r/ndb_partition_list.result -> mysql-test/suite/parts/r/ndb_partition_list.result
mysql-test/suite/parts/r/ndb_partition_range.result:
  Rename: mysql-test/suite/partitions/r/ndb_partition_range.result -> mysql-test/suite/parts/r/ndb_partition_range.result
mysql-test/suite/parts/r/partition_alter1_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_alter1_innodb.result -> mysql-test/suite/parts/r/partition_alter1_innodb.result
mysql-test/suite/parts/r/partition_alter1_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_alter1_myisam.result -> mysql-test/suite/parts/r/partition_alter1_myisam.result
mysql-test/suite/parts/r/partition_alter2_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_alter2_innodb.result -> mysql-test/suite/parts/r/partition_alter2_innodb.result
mysql-test/suite/parts/r/partition_alter2_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_alter2_myisam.result -> mysql-test/suite/parts/r/partition_alter2_myisam.result
mysql-test/suite/parts/r/partition_alter3_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_alter3_innodb.result -> mysql-test/suite/parts/r/partition_alter3_innodb.result
mysql-test/suite/parts/r/partition_alter3_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_alter3_myisam.result -> mysql-test/suite/parts/r/partition_alter3_myisam.result
mysql-test/suite/parts/r/partition_alter4_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_alter4_innodb.result -> mysql-test/suite/parts/r/partition_alter4_innodb.result
mysql-test/suite/parts/r/partition_alter4_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_alter4_myisam.result -> mysql-test/suite/parts/r/partition_alter4_myisam.result
mysql-test/suite/parts/r/partition_basic_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_basic_innodb.result -> mysql-test/suite/parts/r/partition_basic_innodb.result
mysql-test/suite/parts/r/partition_basic_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_basic_myisam.result -> mysql-test/suite/parts/r/partition_basic_myisam.result
mysql-test/suite/parts/r/partition_bit_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_bit_innodb.result -> mysql-test/suite/parts/r/partition_bit_innodb.result
mysql-test/suite/parts/r/partition_bit_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_bit_myisam.result -> mysql-test/suite/parts/r/partition_bit_myisam.result
mysql-test/suite/parts/r/partition_bit_ndb.result:
  Rename: mysql-test/suite/partitions/r/partition_bit_ndb.result -> mysql-test/suite/parts/r/partition_bit_ndb.result
mysql-test/suite/parts/r/partition_char_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_char_innodb.result -> mysql-test/suite/parts/r/partition_char_innodb.result
mysql-test/suite/parts/r/partition_char_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_char_myisam.result -> mysql-test/suite/parts/r/partition_char_myisam.result
mysql-test/suite/parts/r/partition_datetime_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_datetime_innodb.result -> mysql-test/suite/parts/r/partition_datetime_innodb.result
mysql-test/suite/parts/r/partition_datetime_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_datetime_myisam.result -> mysql-test/suite/parts/r/partition_datetime_myisam.result
mysql-test/suite/parts/r/partition_decimal_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_decimal_innodb.result -> mysql-test/suite/parts/r/partition_decimal_innodb.result
mysql-test/suite/parts/r/partition_decimal_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_decimal_myisam.result -> mysql-test/suite/parts/r/partition_decimal_myisam.result
mysql-test/suite/parts/r/partition_engine_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_engine_innodb.result -> mysql-test/suite/parts/r/partition_engine_innodb.result
mysql-test/suite/parts/r/partition_engine_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_engine_myisam.result -> mysql-test/suite/parts/r/partition_engine_myisam.result
mysql-test/suite/parts/r/partition_engine_ndb.result:
  Rename: mysql-test/suite/partitions/r/partition_engine_ndb.result -> mysql-test/suite/parts/r/partition_engine_ndb.result
mysql-test/suite/parts/r/partition_float_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_float_innodb.result -> mysql-test/suite/parts/r/partition_float_innodb.result
mysql-test/suite/parts/r/partition_float_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_float_myisam.result -> mysql-test/suite/parts/r/partition_float_myisam.result
mysql-test/suite/parts/r/partition_int_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_int_innodb.result -> mysql-test/suite/parts/r/partition_int_innodb.result
mysql-test/suite/parts/r/partition_int_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_int_myisam.result -> mysql-test/suite/parts/r/partition_int_myisam.result
mysql-test/suite/parts/r/partition_int_ndb.result:
  Rename: mysql-test/suite/partitions/r/partition_int_ndb.result -> mysql-test/suite/parts/r/partition_int_ndb.result
mysql-test/suite/parts/r/partition_special_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_special_innodb.result -> mysql-test/suite/parts/r/partition_special_innodb.result
mysql-test/suite/parts/r/partition_special_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_special_myisam.result -> mysql-test/suite/parts/r/partition_special_myisam.result
mysql-test/suite/parts/r/partition_syntax_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_syntax_innodb.result -> mysql-test/suite/parts/r/partition_syntax_innodb.result
mysql-test/suite/parts/r/partition_syntax_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_syntax_myisam.result -> mysql-test/suite/parts/r/partition_syntax_myisam.result
mysql-test/suite/parts/r/partition_syntax_ndb.result:
  Rename: mysql-test/suite/partitions/r/partition_syntax_ndb.result -> mysql-test/suite/parts/r/partition_syntax_ndb.result
mysql-test/suite/parts/r/partition_t55.out:
  Rename: mysql-test/suite/partitions/r/partition_t55.out -> mysql-test/suite/parts/r/partition_t55.out
mysql-test/suite/parts/r/partition_value_innodb.result:
  Rename: mysql-test/suite/partitions/r/partition_value_innodb.result -> mysql-test/suite/parts/r/partition_value_innodb.result
mysql-test/suite/parts/r/partition_value_myisam.result:
  Rename: mysql-test/suite/partitions/r/partition_value_myisam.result -> mysql-test/suite/parts/r/partition_value_myisam.result
mysql-test/suite/parts/r/partition_value_ndb.result:
  Rename: mysql-test/suite/partitions/r/partition_value_ndb.result -> mysql-test/suite/parts/r/partition_value_ndb.result
mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result:
  Rename: mysql-test/suite/partitions/r/rpl_ndb_dd_partitions.result -> mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result
mysql-test/suite/parts/t/disabled.def:
  Rename: mysql-test/suite/partitions/t/disabled.def -> mysql-test/suite/parts/t/disabled.def
mysql-test/suite/parts/t/ndb_blob_partition.test:
  Rename: mysql-test/suite/partitions/t/ndb_blob_partition.test -> mysql-test/suite/parts/t/ndb_blob_partition.test
mysql-test/suite/parts/t/ndb_dd_backuprestore.test:
  Rename: mysql-test/suite/partitions/t/ndb_dd_backuprestore.test -> mysql-test/suite/parts/t/ndb_dd_backuprestore.test
mysql-test/suite/parts/t/ndb_partition_error.test:
  Rename: mysql-test/suite/partitions/t/ndb_partition_error.test -> mysql-test/suite/parts/t/ndb_partition_error.test
mysql-test/suite/parts/t/ndb_partition_key.test:
  Rename: mysql-test/suite/partitions/t/ndb_partition_key.test -> mysql-test/suite/parts/t/ndb_partition_key.test
mysql-test/suite/parts/t/ndb_partition_list.test:
  Rename: mysql-test/suite/partitions/t/ndb_partition_list.test -> mysql-test/suite/parts/t/ndb_partition_list.test
mysql-test/suite/parts/t/ndb_partition_range.test:
  Rename: mysql-test/suite/partitions/t/ndb_partition_range.test -> mysql-test/suite/parts/t/ndb_partition_range.test
mysql-test/suite/parts/t/partition_sessions.test:
  Rename: mysql-test/suite/partitions/t/partition_sessions.test -> mysql-test/suite/parts/t/partition_sessions.test
mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test:
  Rename: mysql-test/suite/partitions/t/rpl_ndb_dd_partitions.test -> mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test
mysql-test/suite/parts/inc/partition.pre:
  Rename: mysql-test/suite/parts/include/partition.pre -> mysql-test/suite/parts/inc/partition.pre
mysql-test/suite/parts/inc/partition_20.inc:
  Rename: mysql-test/suite/parts/include/partition_20.inc -> mysql-test/suite/parts/inc/partition_20.inc
mysql-test/suite/parts/inc/partition_bigint.inc:
  Rename: mysql-test/suite/parts/include/partition_bigint.inc -> mysql-test/suite/parts/inc/partition_bigint.inc
mysql-test/suite/parts/inc/partition_binary.inc:
  Rename: mysql-test/suite/parts/include/partition_binary.inc -> mysql-test/suite/parts/inc/partition_binary.inc
mysql-test/suite/parts/inc/partition_bit.inc:
  Rename: mysql-test/suite/parts/include/partition_bit.inc -> mysql-test/suite/parts/inc/partition_bit.inc
mysql-test/suite/parts/inc/partition_blob.inc:
  Rename: mysql-test/suite/parts/include/partition_blob.inc -> mysql-test/suite/parts/inc/partition_blob.inc
mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc:
  Rename: mysql-test/suite/parts/include/partition_blocked_sql_funcs.inc -> mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc
mysql-test/suite/parts/inc/partition_char.inc:
  Rename: mysql-test/suite/parts/include/partition_char.inc -> mysql-test/suite/parts/inc/partition_char.inc
mysql-test/suite/parts/inc/partition_check_drop.inc:
  Rename: mysql-test/suite/parts/include/partition_check_drop.inc -> mysql-test/suite/parts/inc/partition_check_drop.inc
mysql-test/suite/parts/inc/partition_check_read.inc:
  Rename: mysql-test/suite/parts/include/partition_check_read.inc -> mysql-test/suite/parts/inc/partition_check_read.inc
mysql-test/suite/parts/inc/partition_check_read1.inc:
  Rename: mysql-test/suite/parts/include/partition_check_read1.inc -> mysql-test/suite/parts/inc/partition_check_read1.inc
mysql-test/suite/parts/inc/partition_check_read2.inc:
  Rename: mysql-test/suite/parts/include/partition_check_read2.inc -> mysql-test/suite/parts/inc/partition_check_read2.inc
mysql-test/suite/parts/inc/partition_cleanup.inc:
  Rename: mysql-test/suite/parts/include/partition_cleanup.inc -> mysql-test/suite/parts/inc/partition_cleanup.inc
mysql-test/suite/parts/inc/partition_date.inc:
  Rename: mysql-test/suite/parts/include/partition_date.inc -> mysql-test/suite/parts/inc/partition_date.inc
mysql-test/suite/parts/inc/partition_datetime.inc:
  Rename: mysql-test/suite/parts/include/partition_datetime.inc -> mysql-test/suite/parts/inc/partition_datetime.inc
mysql-test/suite/parts/inc/partition_decimal.inc:
  Rename: mysql-test/suite/parts/include/partition_decimal.inc -> mysql-test/suite/parts/inc/partition_decimal.inc
mysql-test/suite/parts/inc/partition_double.inc:
  Rename: mysql-test/suite/parts/include/partition_double.inc -> mysql-test/suite/parts/inc/partition_double.inc
mysql-test/suite/parts/inc/partition_enum.inc:
  Rename: mysql-test/suite/parts/include/partition_enum.inc -> mysql-test/suite/parts/inc/partition_enum.inc
mysql-test/suite/parts/inc/partition_float.inc:
  Rename: mysql-test/suite/parts/include/partition_float.inc -> mysql-test/suite/parts/inc/partition_float.inc
mysql-test/suite/parts/inc/partition_int.inc:
  Rename: mysql-test/suite/parts/include/partition_int.inc -> mysql-test/suite/parts/inc/partition_int.inc
mysql-test/suite/parts/inc/partition_key_16col.inc:
  Rename: mysql-test/suite/parts/include/partition_key_16col.inc -> mysql-test/suite/parts/inc/partition_key_16col.inc
mysql-test/suite/parts/inc/partition_key_32col.inc:
  Rename: mysql-test/suite/parts/include/partition_key_32col.inc -> mysql-test/suite/parts/inc/partition_key_32col.inc
mysql-test/suite/parts/inc/partition_key_4col.inc:
  Rename: mysql-test/suite/parts/include/partition_key_4col.inc -> mysql-test/suite/parts/inc/partition_key_4col.inc
mysql-test/suite/parts/inc/partition_key_8col.inc:
  Rename: mysql-test/suite/parts/include/partition_key_8col.inc -> mysql-test/suite/parts/inc/partition_key_8col.inc
mysql-test/suite/parts/inc/partition_layout_check1.inc:
  Rename: mysql-test/suite/parts/include/partition_layout_check1.inc -> mysql-test/suite/parts/inc/partition_layout_check1.inc
mysql-test/suite/parts/inc/partition_layout_check2.inc:
  Rename: mysql-test/suite/parts/include/partition_layout_check2.inc -> mysql-test/suite/parts/inc/partition_layout_check2.inc
mysql-test/suite/parts/inc/partition_mediumint.inc:
  Rename: mysql-test/suite/parts/include/partition_mediumint.inc -> mysql-test/suite/parts/inc/partition_mediumint.inc
mysql-test/suite/parts/inc/partition_set.inc:
  Rename: mysql-test/suite/parts/include/partition_set.inc -> mysql-test/suite/parts/inc/partition_set.inc
mysql-test/suite/parts/inc/partition_smallint.inc:
  Rename: mysql-test/suite/parts/include/partition_smallint.inc -> mysql-test/suite/parts/inc/partition_smallint.inc
mysql-test/suite/parts/inc/partition_text.inc:
  Rename: mysql-test/suite/parts/include/partition_text.inc -> mysql-test/suite/parts/inc/partition_text.inc
mysql-test/suite/parts/inc/partition_time.inc:
  Rename: mysql-test/suite/parts/include/partition_time.inc -> mysql-test/suite/parts/inc/partition_time.inc
mysql-test/suite/parts/inc/partition_timestamp.inc:
  Rename: mysql-test/suite/parts/include/partition_timestamp.inc -> mysql-test/suite/parts/inc/partition_timestamp.inc
mysql-test/suite/parts/inc/partition_tinyint.inc:
  Rename: mysql-test/suite/parts/include/partition_tinyint.inc -> mysql-test/suite/parts/inc/partition_tinyint.inc
mysql-test/suite/parts/inc/partition_trigg1.inc:
  Rename: mysql-test/suite/parts/include/partition_trigg1.inc -> mysql-test/suite/parts/inc/partition_trigg1.inc
mysql-test/suite/parts/inc/partition_trigg2.inc:
  Rename: mysql-test/suite/parts/include/partition_trigg2.inc -> mysql-test/suite/parts/inc/partition_trigg2.inc
mysql-test/suite/parts/inc/partition_trigg3.inc:
  Rename: mysql-test/suite/parts/include/partition_trigg3.inc -> mysql-test/suite/parts/inc/partition_trigg3.inc
mysql-test/suite/parts/inc/partition_value.inc:
  Rename: mysql-test/suite/parts/include/partition_value.inc -> mysql-test/suite/parts/inc/partition_value.inc
mysql-test/suite/parts/inc/partition_varbinary.inc:
  Rename: mysql-test/suite/parts/include/partition_varbinary.inc -> mysql-test/suite/parts/inc/partition_varbinary.inc
mysql-test/suite/parts/inc/partition_varchar.inc:
  Rename: mysql-test/suite/parts/include/partition_varchar.inc -> mysql-test/suite/parts/inc/partition_varchar.inc
mysql-test/suite/parts/inc/partition_year.inc:
  Rename: mysql-test/suite/parts/include/partition_year.inc -> mysql-test/suite/parts/inc/partition_year.inc
mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc:
  Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_ch1.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc
mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc:
  Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_date.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc
mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc:
  Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_float.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc
mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc:
  Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_int.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc
mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result:
  Rename: mysql-test/suite/parts/r/partition_blocked_sql_func_innodb.result -> mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result
mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result:
  Rename: mysql-test/suite/parts/r/partition_blocked_sql_func_myisam.result -> mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result
mysql-test/suite/parts/r/part_supported_sql_func_ndb.result:
  Rename: mysql-test/suite/parts/r/partition_supported_sql_func_ndb.result -> mysql-test/suite/parts/r/part_supported_sql_func_ndb.result
mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc:
  Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.cin -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc
2007-04-30 16:24:13 +02:00

412 lines
12 KiB
Text

#--------------------------------------------------
# Initialize system_3 test variables
#--------------------------------------------------
--source suite/system_3/include/system_3_init.inc
let $NUM_VAL=`SELECT @NUM_VAL`;
let $LOAD_LINES=`SELECT @LOAD_LINES`;
let $LOG_UPPER=`SELECT @LOG_UPPER`;
let $LOG_LOWER=`SELECT @LOG_LOWER`;
#let $ENG1=`SELECT @ENG1`;
let $ENG2=`SELECT @ENG2`;
let $ENG_LOG=`SELECT @ENG_LOG`;
let $CLIENT_HOST=`SELECT @CLIENT_HOST`;
let $ENG=innodb;
let $ENG1=innodb;
#---------------------------------------------------------
# Column list with definition for all tables to be checked
#---------------------------------------------------------
let $column_list= f1 int,
f2 char (15),
f3 decimal (5,3),
f4 datetime;
let $col_access_list = f1,f2,f3,f4 ;
let $col_new_list = new.f1,new.f2,new.f3 new.f4 ;
#--------------------------------------------------
# initialize directories for partitions
#--------------------------------------------------
--disable_query_log
# DATA DIRECTORY
# Make directory for partition data
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
eval SET @data_dir = 'DATA DIRECTORY =
''$MYSQLTEST_VARDIR/master-data/tmpdata''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
# Make directory for partition index
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpindex || true
eval SET @indx_dir = 'INDEX DIRECTORY =
''$MYSQLTEST_VARDIR/master-data/tmpindex''';
let $index_directory = `select @indx_dir`;
--enable_query_log
#---------------------------------------------------
# Setting the parameters to use during testing
#---------------------------------------------------
# Set number of variations of the f1 variable (used to segment the rows
# being updated/deleted by a user at a time. The higher the number, the
# more smaller segments used with each query.
--replace_result $NUM_VAL NUM_VAL
eval set @f1_nums=$NUM_VAL;
# The following sets the number controls the size of the log table.
# Once a size of '@threshold' is reached, the first rows are removed
# sunch that the table is down to '@shrink_to' lines
--replace_result $LOG_LOWER LOG_LOWER
eval set @shrink_to=$LOG_LOWER;
--replace_result $LOG_UPPER LOG_UPPER
eval set @threshold=$LOG_UPPER;
#---------------------------------------------------
# Creating the database tables and loading the data
#---------------------------------------------------
--disable_warnings
drop database if exists systest1;
--enable_warnings
create database systest1;
--disable_abort_on_error
--replace_result $CLIENT_HOST CLIENT_HOST
eval create user systuser@'$CLIENT_HOST';
--enable_abort_on_error
--replace_result $CLIENT_HOST CLIENT_HOST
eval set password for systuser@'$CLIENT_HOST' = password('systpass');
--replace_result $CLIENT_HOST CLIENT_HOST
eval grant ALL on systest1.* to systuser@'$CLIENT_HOST';
use systest1;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (systuser,localhost,systuser,systpass,systest1,$MASTER_MYPORT,$MASTER_MYSOCK);
create table tb1_master (
f1 int,
f2 char(15),
f3 decimal (5,3),
f4 datetime
);
#--replace_result $ENG_LOG ENG_LOG
eval create table tb1_logs (
i1 int NOT NULL auto_increment, primary key (i1),
dt1 datetime NOT NULL,
entry_dsc char(100),
f4 int
) engine=$ENG_LOG
;
#PARTITION BY HASH (i1) PARTITIONS 8;
if ($debug)
{
SHOW CREATE TABLE tb1_logs;
}
#--replace_result $ENG_LOG ENG_LOG
eval create table ddl_logs (
i1 int NOT NULL auto_increment, primary key (i1),
dt1 datetime NOT NULL,
entry_dsc char(100),
errno int
) engine=$ENG_LOG;
#PARTITION BY HASH (i1) PARTITIONS 8;
if ($debug)
{
SHOW CREATE TABLE tb1_logs;
}
create table test_stat (
dt1 datetime,
table_name char(20),
row_count int,
start_row int,
end_row int
);
#----------------------------------------------------------------------
# tb3_eng1: key partitioning
#----------------------------------------------------------------------
#--replace_result $data_directory <data_directory> $index_directory <index_directory> $ENG1 ENG1
eval create table tb3_eng1 (
i1 int NOT NULL auto_increment, primary key (i1),
$column_list
) engine=$ENG1
PARTITION BY KEY (i1) PARTITIONS 4
(PARTITION part1 $data_directory $index_directory,
PARTITION part2 $data_directory $index_directory,
PARTITION part3 $data_directory $index_directory,
PARTITION part4 $data_directory $index_directory);
#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data local infile '$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt'
into table tb3_eng1 ($col_access_list);
if ($WITH_TRIGGERS)
{
delimiter //;
Create trigger tb3_eng1_ins after insert on tb3_eng1 for each row
BEGIN
insert into tb1_logs (dt1, entry_dsc, f4)
values (now(), concat('Insert row ', new.f1,' ',
new.f2, ' ', new.f3, ' (tb3_eng1)'), new.f1);
END//
Create trigger tb3_eng1_upd after update on tb3_eng1 for each row
BEGIN
insert into tb1_logs (dt1, entry_dsc, f4)
values (now(), concat('Update row ', old.f1,' ', old.f2, '->',
new.f2, ' ', old.f3, '->', new.f3, ' (tb3_eng1)'), new.f1);
END//
Create trigger tb3_eng1_del after delete on tb3_eng1 for each row
BEGIN
insert into tb1_logs (dt1, entry_dsc, f4)
values (now(), concat('Delete row ', old.f1,' ', old.f2, ' ',
old.f3, ' (tb3_eng1)'), old.f1);
END//
delimiter ;//
}
delimiter //;
# This functions returns a random integer number
# between zero and 'num'
#-----------------------------------------------
create function int_rand(num int) returns int
BEGIN
return round(num*rand()+0.5);
END//
# This function returns a string in the length 'len' of
# random letters (ascii range of 65-122)
#------------------------------------------------------
create function str_rand (len int) returns char(12)
BEGIN
declare tmp_letter char(1);
declare tmp_word char(12);
declare word_str char(12) default '';
wl_loop: WHILE len DO
set tmp_letter=char(round(57*rand()+65));
set tmp_word=concat(word_str,tmp_letter);
set word_str=tmp_word;
set len=len-1;
END WHILE wl_loop;
return word_str;
END//
# This procedure scans 'tb1_master' table for rows where f1='num_pr'
# and for each row inserts a row in 'tb3_eng1'
#------------------------------------------------------------------
eval create procedure ins_tb3_eng1 (num_pr int, str_pr char(15))
BEGIN
declare done int default 0;
declare v3 decimal(5,3);
declare cur1 cursor for
select f3 from tb1_master where f1=num_pr;
declare continue handler for sqlstate '01000' set done = 1;
declare continue handler for sqlstate '02000' set done = 1;
open cur1;
fetch cur1 into v3;
wl_loop: WHILE NOT done DO
insert into tb3_eng1 ($col_access_list) values
(int_rand(@f1_nums), concat('I:',str_pr,'-',num_pr), v3, now());
fetch cur1 into v3;
END WHILE wl_loop;
close cur1;
END//
# This procedure does selects from the 'tb1_logs' and inserts the
# count into the table
#------------------------------------------------------------------
create procedure slct_tb1_logs ()
BEGIN
declare done int default 0;
declare v4 int;
declare v_count int default 0;
declare str_val char(15) default ELT(int_rand(3),
'Insert', 'Update', 'Delete');
declare cur1 cursor for
select f4 from tb1_logs where entry_dsc like concat('%',str_val,'%');
declare continue handler for sqlstate '01000' set done = 1;
declare continue handler for sqlstate '02000' set done = 1;
open cur1;
fetch cur1 into v4;
wl_loop: WHILE NOT done DO
set v_count=v_count+1;
fetch cur1 into v4;
END WHILE wl_loop;
close cur1;
insert into tb1_logs (dt1, entry_dsc, f4)
values (now(), concat('Number of \'', str_val, '\' rows is: ',
v_count, ' (tb1_log)'),0);
END//
delimiter ;//
--disable_abort_on_error
insert into systest1.tb3_eng1 values (NULL,50,'init_val',12.345,'2005-01-01 00:00:00');
insert into systest1.tb3_eng1 values (NULL,70,'init_val',12.345,'2005-01-01 00:00:00');
--enable_abort_on_error
connection default;0.
--disable_abort_on_error
--replace_result $CLIENT_HOST CLIENT_HOST
eval create user syst1user@'$CLIENT_HOST';
--enable_abort_on_error
--replace_result $CLIENT_HOST CLIENT_HOST
eval set password for syst1user@'$CLIENT_HOST' = password('systpass');
--replace_result $CLIENT_HOST CLIENT_HOST
eval grant ALL on systest1.* to syst1user@'$CLIENT_HOST';
use systest1;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (syst1user,localhost,syst1user,systpass,systest1,$MASTER_MYPORT,$MASTER_MYSOCK);
--source suite/system_3/include/system_3_init.inc
use systest1;
let $NUM_VAL=`SELECT @NUM_VAL`;
eval SET @f1_nums=$NUM_VAL;
SET @tmp_num=int_rand(@f1_nums);
SET @tmp_word=str_rand(4);
# DEBUG select @tmp_num, @tmp_word;
# Insert rows replacing the deleted rows using a strored procedure
# that reads the rows from a master table
CALL ins_tb3_eng1 (@tmp_num, @tmp_word);
connection syst1user;
--source suite/system_3/include/system_3_init.inc
use systest1;
let $NUM_VAL=`SELECT @NUM_VAL`;
eval SET @f1_nums=$NUM_VAL;
SET @tmp_num=int_rand(@f1_nums);
SET @tmp_word=str_rand(4);
# DEBUG select @tmp_num, @tmp_word;
# Insert rows replacing the deleted rows using a strored procedure
# that reads the rows from a master table
CALL ins_tb3_eng1 (@tmp_num, @tmp_word);
connection systuser;
--source suite/system_3/include/system_3_init.inc
use systest1;
call slct_tb1_logs();
connection syst1user;
--source suite/system_3/include/system_3_init.inc
use systest1;
let $NUM_VAL=`SELECT @NUM_VAL`;
eval set @f1_nums=$NUM_VAL;
set @tmp_num=int_rand(@f1_nums);
set @tmp_word=str_rand(4);
select @tmp_num, @tmp_word;
# Update all rows in the table where f1 is one less the random number
update tb3_eng1
set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1
where f1=@tmp_num-1;
connection systuser;
--source suite/system_3/include/system_3_init.inc
use systest1;
let $NUM_VAL=`SELECT @NUM_VAL`;
eval set @f1_nums=$NUM_VAL;
set @tmp_num=int_rand(@f1_nums);
set @tmp_word=str_rand(4);
select @tmp_num, @tmp_word;
# Update all rows in the table where f1 is one less the random number
update tb3_eng1
set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1
where f1=@tmp_num-1;
connection syst1user;
--source suite/system_3/include/system_3_init.inc
use systest1;
call slct_tb1_logs();
connection systuser;
--source suite/system_3/include/system_3_init.inc
use systest1;
let $NUM_VAL=`SELECT @NUM_VAL`;
eval set @f1_nums=$NUM_VAL;
set @tmp_num=int_rand(@f1_nums);
set @tmp_word=str_rand(4);
select @tmp_num, @tmp_word;
# Update all rows in the table where f1 is one less the random number
update tb3_eng1
set f2=concat('U:',@tmp_word,'-',@tmp_num), f3=f3+1
where f1=@tmp_num-1;
connection syst1user;
--source suite/system_3/include/system_3_init.inc
use systest1;
#--replace_result $NUM_VAL <NUM_VAL>
let $NUM_VAL=`SELECT @NUM_VAL`;
eval set @f1_nums=$NUM_VAL;
set @tmp_num=int_rand(@f1_nums);
select @tmp_num;
# DEBUG select @tmp_num, @tmp_word;
# Delete all rows from the table where f1 is equal to the above number
delete from tb3_eng1 where f1=@tmp_num;
connection systuser;
--source suite/system_3/include/system_3_init.inc
use systest1;
select * from tb3_eng1 where f1>40;
connection syst1user;
--source suite/system_3/include/system_3_init.inc
use systest1;
let $NUM_VAL=`SELECT @NUM_VAL`;
eval set @f1_nums=$NUM_VAL;
set @tmp_num=int_rand(@f1_nums);
select @tmp_num;
# DEBUG select @tmp_num, @tmp_word;
# Delete all rows from the table where f1 is equal to the above number
delete from tb3_eng1 where f1=@tmp_num;
connection systuser;
--source suite/system_3/include/system_3_init.inc
use systest1;
select * from tb3_eng1 where f1>40;
connection syst1user;
--source suite/system_3/include/system_3_init.inc
use systest1;
let $NUM_VAL=`SELECT @NUM_VAL`;
eval set @f1_nums=$NUM_VAL;
set @tmp_num=int_rand(@f1_nums);
select @tmp_num;
select @tmp_num, @tmp_word;
# Delete all rows from the table where f1 is equal to the above number
delete from tb3_eng1 where f1=@tmp_num;
connection systuser;
--source suite/system_3/include/system_3_init.inc
use systest1;
select * from tb3_eng1 where f1>40;