Debian Codegraph @

mysql-test/suite/s3/basic.result

raw
1 drop table if exists t1;
2 #
3 # Test simple create of s3 table
4 #
5 create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria;
6 Warnings:
7 Note 1071 Specified key was too long; max key length is 2300 bytes
8 insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_10000;
9 alter table t1 engine=s3;
10 show create table t1;
11 Table Create Table
12 t1 CREATE TABLE `t1` (
13 `a` int(11) DEFAULT NULL,
14 `b` int(11) DEFAULT NULL,
15 `c` varchar(1000) DEFAULT NULL,
16 KEY `a` (`a`),
17 KEY `c` (`c`(575))
18 ) ENGINE=S3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
19 select * from information_schema.tables where table_schema="database" and table_name="t1";;
20 TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
21 def # t1 BASE TABLE S3 10 Page 10000 567 5677056 # 385024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL page_checksum=1 2305843009213685760 #
22 show table status like "t1";
23 Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
24 t1 S3 10 Page 10000 567 5677056 # 385024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL page_checksum=1 # N
25 select a,b from t1 limit 10;
26 a b
27 1 11
28 2 12
29 3 13
30 4 14
31 5 15
32 6 16
33 7 17
34 8 18
35 9 19
36 10 20
37 select count(*) from t1;
38 count(*)
39 10000
40 select a,b from t1 where a between 10 and 20;
41 a b
42 10 20
43 11 21
44 12 22
45 13 23
46 14 24
47 15 25
48 16 26
49 17 27
50 18 28
51 19 29
52 20 30
53 explain select * from t1 where a between 10 and 20;
54 id select_type table type possible_keys key key_len ref rows Extra
55 1 SIMPLE t1 range a a 5 NULL # Using index condition
56 insert into t1 values (1,1);
57 ERROR HY000: Table 't1' is read only
58 update t1 set b=100 where a=1;
59 ERROR HY000: Table 't1' is read only
60 delete from t1 where a>10;
61 ERROR HY000: Table 't1' is read only
62 #
63 # Analyze, repair, optimize and check table
64 #
65 set @@use_stat_tables='never';
66 truncate mysql.table_stats;
67 check table t1 fast;
68 Table Op Msg_type Msg_text
69 database.t1 check status Table is already up to date
70 check table t1 quick;
71 Table Op Msg_type Msg_text
72 database.t1 check status OK
73 check table t1 extended;
74 Table Op Msg_type Msg_text
75 database.t1 check status OK
76 analyze table t1;
77 Table Op Msg_type Msg_text
78 database.t1 analyze status Table 'database.t1' is read only
79 analyze table t1 persistent for all;
80 Table Op Msg_type Msg_text
81 database.t1 analyze status Table 'database.t1' is read only
82 database.t1 analyze status Engine-independent statistics collected
83 database.t1 analyze status OK
84 repair table t1;
85 Table Op Msg_type Msg_text
86 database.t1 repair Error Table 't1' is read only
87 database.t1 repair status Operation failed
88 optimize table t1;
89 Table Op Msg_type Msg_text
90 database.t1 optimize Error Table 't1' is read only
91 database.t1 optimize status Operation failed
92 select * from mysql.table_stats;
93 db_name table_name cardinality
94 database t1 10000
95 #
96 # Converting table back to Aria
97 #
98 alter table t1 engine=aria;
99 show create table t1;
100 Table Create Table
101 t1 CREATE TABLE `t1` (
102 `a` int(11) DEFAULT NULL,
103 `b` int(11) DEFAULT NULL,
104 `c` varchar(1000) DEFAULT NULL,
105 KEY `a` (`a`),
106 KEY `c` (`c`(575))
107 ) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
108 select a,b from t1 limit 10;
109 a b
110 1 11
111 2 12
112 3 13
113 4 14
114 5 15
115 6 16
116 7 17
117 8 18
118 9 19
119 10 20
120 select count(*) from t1;
121 count(*)
122 10000
123 delete from t1 where a=1;
124 drop table t1;
125 #
126 # status
127 #
128 show variables like "s3%";
129 Variable_name Value
130 s3_access_key X
131 s3_block_size X
132 s3_bucket X
133 s3_debug X
134 s3_host_name X
135 s3_no_content_type X
136 s3_pagecache_age_threshold X
137 s3_pagecache_buffer_size X
138 s3_pagecache_division_limit X
139 s3_pagecache_file_hash_size X
140 s3_port X
141 s3_protocol_version X
142 s3_provider X
143 s3_region X
144 s3_replicate_alter_as_create_select X
145 s3_secret_key X
146 s3_slave_ignore_updates X
147 s3_ssl_no_verify X
148 s3_use_http X
149 show variables like "s3_slave%";
150 Variable_name Value
151 s3_slave_ignore_updates OFF
152 show variables like "s3_replicate%";
153 Variable_name Value
154 s3_replicate_alter_as_create_select ON
155 show status like "s3%";
156 Variable_name Value
157 S3_pagecache_blocks_not_flushed X
158 S3_pagecache_blocks_unused X
159 S3_pagecache_blocks_used X
160 S3_pagecache_read_requests X
161 S3_pagecache_reads X