@@ -2,23 +2,25 @@ drop table if exists t1;
2
2
#
3
3
# Test simple create of s3 table
4
4
#
5
- create or replace table t1 (a int, b int, key (a)) engine=aria;
6
- insert into t1 select seq,seq+10 from seq_1_to_10000;
5
+ create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c )) engine=aria;
6
+ insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_10000;
7
7
alter table t1 engine=s3;
8
8
show create table t1;
9
9
Table Create Table
10
10
t1 CREATE TABLE `t1` (
11
11
`a` int(11) DEFAULT NULL,
12
12
`b` int(11) DEFAULT NULL,
13
- KEY `a` (`a`)
13
+ `c` varchar(1000) DEFAULT NULL,
14
+ KEY `a` (`a`),
15
+ KEY `c` (`c`)
14
16
) ENGINE=S3 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
15
17
select * from information_schema.tables where table_schema="database" and table_name="t1";;
16
18
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
17
- def # t1 BASE TABLE S3 10 Page 10000 33 335872 # 122880 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 9007199254732800 #
19
+ def # t1 BASE TABLE S3 10 Page 10000 567 5677056 # 761856 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 2305843009213685760 #
18
20
show table status like "t1";
19
21
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
20
- t1 S3 10 Page 10000 33 335872 # 122880 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 # N
21
- select * from t1 limit 10;
22
+ t1 S3 10 Page 10000 567 5677056 # 761856 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 # N
23
+ select a,b from t1 limit 10;
22
24
a b
23
25
1 11
24
26
2 12
33
35
select count(*) from t1;
34
36
count(*)
35
37
10000
36
- select * from t1 where a between 10 and 20;
38
+ select a,b from t1 where a between 10 and 20;
37
39
a b
38
40
10 20
39
41
11 21
@@ -60,9 +62,15 @@ ERROR HY000: Table 't1' is read only
60
62
#
61
63
set @@use_stat_tables='never';
62
64
truncate mysql.table_stats;
63
- check table t1;
65
+ check table t1 fast ;
64
66
Table Op Msg_type Msg_text
65
- database.t1 check status Table 'database.t1' is read only
67
+ database.t1 check status Table is already up to date
68
+ check table t1 quick;
69
+ Table Op Msg_type Msg_text
70
+ database.t1 check status OK
71
+ check table t1 extended;
72
+ Table Op Msg_type Msg_text
73
+ database.t1 check status OK
66
74
analyze table t1;
67
75
Table Op Msg_type Msg_text
68
76
database.t1 analyze status Table 'database.t1' is read only
@@ -91,9 +99,11 @@ Table Create Table
91
99
t1 CREATE TABLE `t1` (
92
100
`a` int(11) DEFAULT NULL,
93
101
`b` int(11) DEFAULT NULL,
94
- KEY `a` (`a`)
102
+ `c` varchar(1000) DEFAULT NULL,
103
+ KEY `a` (`a`),
104
+ KEY `c` (`c`)
95
105
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
96
- select * from t1 limit 10;
106
+ select a,b from t1 limit 10;
97
107
a b
98
108
1 11
99
109
2 12
0 commit comments