Debian Codegraph @

mysql-test/suite/s3/arguments.test

raw
1 --source include/have_s3.inc
2 --source include/have_sequence.inc
3
4 #
5 # Create unique database for running the tests
6 #
7 --source create_database.inc
8 --disable_warnings
9 drop table if exists t1;
10 --enable_warnings
11
12 --echo #
13 --echo # Test options
14 --echo #
15
16 create or replace table t1 (a int, b int, key(a)) engine=aria;
17 insert into t1 select seq,seq+10 from seq_1_to_10;
18 alter table t1 engine=s3, s3_block_size=819200, compression_algorithm="zlib";
19 show create table t1;
20 --error ER_BAD_OPTION_VALUE
21 alter table t1 engine=s3, s3_block_size=8192;
22 alter table t1 engine=s3, s3_block_size=65536;
23 show create table t1;
24 --error ER_BAD_OPTION_VALUE
25 alter table t1 engine=s3, s3_block_size=100000;
26 show create table t1;
27 --error ER_BAD_OPTION_VALUE
28 alter table t1 engine=s3, compression_algorithm="wss";
29 drop table t1;
30
31 --echo # Check that key variables are not shown to the end user
32
33 show variables like "s3%key";
34
35 --echo # Show some "static" s3 variables
36 set @tmp= @@global.s3_block_size;
37 show variables like "s3_block_size";
38 set @@global.s3_block_size=65536;
39 show variables like "s3_block_size";
40 set @@global.s3_block_size= @tmp;
41 --error ER_GLOBAL_VARIABLE
42 set @@s3_block_size=65536;
43
44 --echo # Check s3 variables that can't be changed by end user
45
46 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
47 set @@s3_access_key="abc";
48 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
49 set @@s3_secret_key="abc";
50
51 #
52 # clean up
53 #
54 --source drop_database.inc