| 1 |
# Test of scenarios potentially too big for --valgrind or --mem |
| 2 |
--source include/have_maria.inc |
| 3 |
--source include/big_test.inc |
| 4 |
|
| 5 |
let $default_max_allowed_packet=`select @@global.max_allowed_packet`; |
| 6 |
set global max_allowed_packet=400000000; |
| 7 |
# need new session to use setting above |
| 8 |
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); |
| 9 |
connection root; |
| 10 |
|
| 11 |
enable_info; |
| 12 |
set default_storage_engine=aria; |
| 13 |
disable_warnings; |
| 14 |
drop table if exists t1, t2; |
| 15 |
enable_warnings; |
| 16 |
|
| 17 |
# |
| 18 |
# Test generating data with insert select |
| 19 |
# This test case failed once a long time ago |
| 20 |
# |
| 21 |
|
| 22 |
create table t1(a char(3)); |
| 23 |
insert into t1 values("abc"); |
| 24 |
insert into t1 select "def" from t1; |
| 25 |
insert into t1 select "ghi" from t1; |
| 26 |
insert into t1 select "jkl" from t1; |
| 27 |
insert into t1 select "mno" from t1; |
| 28 |
insert into t1 select "pqr" from t1; |
| 29 |
insert into t1 select "stu" from t1; |
| 30 |
insert into t1 select "vwx" from t1; |
| 31 |
insert into t1 select "yza" from t1; |
| 32 |
insert into t1 select "ceg" from t1; |
| 33 |
insert into t1 select "ikm" from t1; |
| 34 |
insert into t1 select "oqs" from t1; |
| 35 |
select count(*) from t1; |
| 36 |
insert into t1 select "uwy" from t1; |
| 37 |
create table t2 select * from t1; |
| 38 |
select count(*) from t1; |
| 39 |
select count(*) from t2; |
| 40 |
drop table t1, t2; |
| 41 |
|
| 42 |
# |
| 43 |
# Test creating a really big blob (up to 16M) |
| 44 |
# |
| 45 |
|
| 46 |
create table t1 (a int, b longtext); |
| 47 |
insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321"); |
| 48 |
|
| 49 |
let $loop=23; |
| 50 |
while ($loop) |
| 51 |
{ |
| 52 |
update t1 set b=CONCAT(b,b); |
| 53 |
dec $loop; |
| 54 |
} |
| 55 |
select a,length(b) from t1; |
| 56 |
check table t1; |
| 57 |
let $loop=22; |
| 58 |
while ($loop) |
| 59 |
{ |
| 60 |
update t1 set b=mid(b,1,length(b)/2); |
| 61 |
dec $loop; |
| 62 |
} |
| 63 |
select a,length(b) from t1; |
| 64 |
check table t1; |
| 65 |
|
| 66 |
drop table t1; |
| 67 |
|
| 68 |
# Set defaults back |
| 69 |
--disable_result_log |
| 70 |
--disable_query_log |
| 71 |
set global aria_log_file_size=default; |
| 72 |
eval set global max_allowed_packet= $default_max_allowed_packet; |
| 73 |
--enable_result_log |
| 74 |
--enable_query_log |