Skip to content

Commit fcd65b0

Browse files
committed
MDEV-17171: RocksDB Tables do not have "Creation Date"
Variant#5 of the patch: - take creation date from the .frm file, like InnoDB does - Update_time is in-memory only (like in InnoDB).
1 parent eafc9d8 commit fcd65b0

19 files changed

+323
-77
lines changed

storage/rocksdb/ha_rocksdb.cc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,6 +2306,8 @@ class Rdb_transaction {
23062306
bool m_is_delayed_snapshot = false;
23072307
bool m_is_two_phase = false;
23082308

2309+
std::unordered_set<Rdb_tbl_def*> modified_tables;
2310+
23092311
private:
23102312
/*
23112313
Number of write operations this transaction had when we took the last
@@ -3001,6 +3003,26 @@ class Rdb_transaction {
30013003
virtual void start_tx() = 0;
30023004
virtual void start_stmt() = 0;
30033005

3006+
protected:
3007+
// Non-virtual functions with actions to be done on transaction start and
3008+
// commit.
3009+
void on_commit() {
3010+
time_t tm;
3011+
tm = time(nullptr);
3012+
for (auto &it : modified_tables) {
3013+
it->update_time = tm;
3014+
}
3015+
modified_tables.clear();
3016+
}
3017+
void on_rollback() {
3018+
modified_tables.clear();
3019+
}
3020+
public:
3021+
// Inform the transaction that this table was modified
3022+
void log_table_write_op(Rdb_tbl_def *tbl) {
3023+
modified_tables.insert(tbl);
3024+
}
3025+
30043026
void set_initial_savepoint() {
30053027
/*
30063028
Set the initial savepoint. If the first statement in the transaction
@@ -3185,7 +3207,9 @@ class Rdb_transaction_impl : public Rdb_transaction {
31853207
goto error;
31863208
}
31873209

3210+
on_commit();
31883211
error:
3212+
on_rollback();
31893213
/* Save the transaction object to be reused */
31903214
release_tx();
31913215

@@ -3201,6 +3225,7 @@ class Rdb_transaction_impl : public Rdb_transaction {
32013225

32023226
public:
32033227
void rollback() override {
3228+
on_rollback();
32043229
m_write_count = 0;
32053230
m_insert_count = 0;
32063231
m_update_count = 0;
@@ -3522,7 +3547,9 @@ class Rdb_writebatch_impl : public Rdb_transaction {
35223547
res = true;
35233548
goto error;
35243549
}
3550+
on_commit();
35253551
error:
3552+
on_rollback();
35263553
reset();
35273554

35283555
m_write_count = 0;
@@ -3555,6 +3582,7 @@ class Rdb_writebatch_impl : public Rdb_transaction {
35553582
}
35563583

35573584
void rollback() override {
3585+
on_rollback();
35583586
m_write_count = 0;
35593587
m_insert_count = 0;
35603588
m_update_count = 0;
@@ -10335,6 +10363,8 @@ int ha_rocksdb::update_write_row(const uchar *const old_data,
1033510363
row_info.tx->incr_insert_count();
1033610364
}
1033710365

10366+
row_info.tx->log_table_write_op(m_tbl_def);
10367+
1033810368
if (do_bulk_commit(row_info.tx)) {
1033910369
DBUG_RETURN(HA_ERR_ROCKSDB_BULK_LOAD);
1034010370
}
@@ -10814,6 +10844,7 @@ int ha_rocksdb::delete_row(const uchar *const buf) {
1081410844
}
1081510845

1081610846
tx->incr_delete_count();
10847+
tx->log_table_write_op(m_tbl_def);
1081710848

1081810849
if (do_bulk_commit(tx)) {
1081910850
DBUG_RETURN(HA_ERR_ROCKSDB_BULK_LOAD);
@@ -11012,6 +11043,12 @@ int ha_rocksdb::info(uint flag) {
1101211043
k->rec_per_key[j] = x;
1101311044
}
1101411045
}
11046+
11047+
stats.create_time = m_tbl_def->get_creation_time();
11048+
}
11049+
11050+
if (flag & HA_STATUS_TIME) {
11051+
stats.update_time = m_tbl_def->update_time;
1101511052
}
1101611053

1101711054
if (flag & HA_STATUS_ERRKEY) {

storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ set rocksdb_bulk_load=0;
121121
--remove_file $file
122122

123123
# Make sure row count index stats are correct
124-
--replace_column 6 # 7 # 8 # 9 #
124+
--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
125125
SHOW TABLE STATUS WHERE name LIKE 't%';
126126

127127
ANALYZE TABLE t1, t2, t3;
128128

129-
--replace_column 6 # 7 # 8 # 9 #
129+
--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
130130
SHOW TABLE STATUS WHERE name LIKE 't%';
131131

132132
# Make sure all the data is there.

storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ set rocksdb_bulk_load=0;
121121
--remove_file $file
122122

123123
# Make sure row count index stats are correct
124-
--replace_column 6 # 7 # 8 # 9 #
124+
--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
125125
SHOW TABLE STATUS WHERE name LIKE 't%';
126126

127127
ANALYZE TABLE t1, t2, t3;
128128

129-
--replace_column 6 # 7 # 8 # 9 #
129+
--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
130130
SHOW TABLE STATUS WHERE name LIKE 't%';
131131

132132
# Make sure all the data is there.

storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ pk a b
4040
set rocksdb_bulk_load=0;
4141
SHOW TABLE STATUS WHERE name LIKE 't%';
4242
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
43-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
44-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
45-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
43+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
44+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
45+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
4646
ANALYZE TABLE t1, t2, t3;
4747
Table Op Msg_type Msg_text
4848
test.t1 analyze status Engine-independent statistics collected
@@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected
5353
test.t3 analyze status OK
5454
SHOW TABLE STATUS WHERE name LIKE 't%';
5555
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
56-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
57-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
58-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
56+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
57+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
58+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
5959
select count(pk),count(a) from t1;
6060
count(pk) count(a)
6161
2500000 2500000

storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ pk a b
4040
set rocksdb_bulk_load=0;
4141
SHOW TABLE STATUS WHERE name LIKE 't%';
4242
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
43-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
44-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
45-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
43+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
44+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
45+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
4646
ANALYZE TABLE t1, t2, t3;
4747
Table Op Msg_type Msg_text
4848
test.t1 analyze status Engine-independent statistics collected
@@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected
5353
test.t3 analyze status OK
5454
SHOW TABLE STATUS WHERE name LIKE 't%';
5555
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
56-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
57-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
58-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
56+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
57+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
58+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
5959
select count(pk),count(a) from t1;
6060
count(pk) count(a)
6161
2500000 2500000

storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ pk a b
4040
set rocksdb_bulk_load=0;
4141
SHOW TABLE STATUS WHERE name LIKE 't%';
4242
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
43-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
44-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
45-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
43+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
44+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
45+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
4646
ANALYZE TABLE t1, t2, t3;
4747
Table Op Msg_type Msg_text
4848
test.t1 analyze status Engine-independent statistics collected
@@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected
5353
test.t3 analyze status OK
5454
SHOW TABLE STATUS WHERE name LIKE 't%';
5555
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
56-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
57-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
58-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
56+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
57+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
58+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
5959
select count(pk),count(a) from t1;
6060
count(pk) count(a)
6161
2500000 2500000

storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ pk a b
4040
set rocksdb_bulk_load=0;
4141
SHOW TABLE STATUS WHERE name LIKE 't%';
4242
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
43-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
44-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
45-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
43+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
44+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
45+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
4646
ANALYZE TABLE t1, t2, t3;
4747
Table Op Msg_type Msg_text
4848
test.t1 analyze status Engine-independent statistics collected
@@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected
5353
test.t3 analyze status OK
5454
SHOW TABLE STATUS WHERE name LIKE 't%';
5555
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
56-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
57-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N
58-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N
56+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
57+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
58+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
5959
select count(pk),count(a) from t1;
6060
count(pk) count(a)
6161
2500000 2500000

storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3;
7272
set rocksdb_bulk_load=0;
7373
SHOW TABLE STATUS WHERE name LIKE 't%';
7474
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
75-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
76-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
77-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N
75+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
76+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
77+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N
7878
ANALYZE TABLE t1, t2, t3;
7979
Table Op Msg_type Msg_text
8080
test.t1 analyze status Engine-independent statistics collected
@@ -85,9 +85,9 @@ test.t3 analyze status Engine-independent statistics collected
8585
test.t3 analyze status OK
8686
SHOW TABLE STATUS WHERE name LIKE 't%';
8787
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
88-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
89-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
90-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N
88+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
89+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
90+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N
9191
select count(a),count(b) from t1;
9292
count(a) count(b)
9393
2500000 2500000

storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3;
7272
set rocksdb_bulk_load=0;
7373
SHOW TABLE STATUS WHERE name LIKE 't%';
7474
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
75-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
76-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
77-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N
75+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
76+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
77+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N
7878
ANALYZE TABLE t1, t2, t3;
7979
Table Op Msg_type Msg_text
8080
test.t1 analyze status Engine-independent statistics collected
@@ -85,9 +85,9 @@ test.t3 analyze status Engine-independent statistics collected
8585
test.t3 analyze status OK
8686
SHOW TABLE STATUS WHERE name LIKE 't%';
8787
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
88-
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
89-
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N
90-
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N
88+
t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
89+
t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
90+
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N
9191
select count(a),count(b) from t1;
9292
count(a) count(b)
9393
2500000 2500000

storage/rocksdb/mysql-test/rocksdb/r/issue255.result

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CREATE TABLE t1 (pk BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT);
22
INSERT INTO t1 VALUES (5);
33
SHOW TABLE STATUS LIKE 't1';
44
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
5-
t1 ROCKSDB # Fixed # # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N
5+
t1 ROCKSDB # Fixed # # # # # # 6 # # NULL latin1_swedish_ci NULL 0 N
66
INSERT INTO t1 VALUES ('538647864786478647864');
77
Warnings:
88
Warning 1264 Out of range value for column 'pk' at row 1
@@ -12,7 +12,7 @@ pk
1212
9223372036854775807
1313
SHOW TABLE STATUS LIKE 't1';
1414
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
15-
t1 ROCKSDB 10 Fixed 2 22 44 0 0 0 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N
15+
t1 ROCKSDB 10 Fixed 2 22 44 0 0 0 9223372036854775807 # # NULL latin1_swedish_ci NULL 0 N
1616
INSERT INTO t1 VALUES ();
1717
ERROR 23000: Duplicate entry '9223372036854775807' for key 'PRIMARY'
1818
SELECT * FROM t1;
@@ -21,7 +21,7 @@ pk
2121
9223372036854775807
2222
SHOW TABLE STATUS LIKE 't1';
2323
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 ROCKSDB # Fixed # # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N
24+
t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 # # NULL latin1_swedish_ci NULL 0 N
2525
INSERT INTO t1 VALUES ();
2626
ERROR 23000: Duplicate entry '9223372036854775807' for key 'PRIMARY'
2727
SELECT * FROM t1;
@@ -30,13 +30,13 @@ pk
3030
9223372036854775807
3131
SHOW TABLE STATUS LIKE 't1';
3232
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
33-
t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N
33+
t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 # # NULL latin1_swedish_ci NULL 0 N
3434
DROP TABLE t1;
3535
CREATE TABLE t1 (pk TINYINT NOT NULL PRIMARY KEY AUTO_INCREMENT);
3636
INSERT INTO t1 VALUES (5);
3737
SHOW TABLE STATUS LIKE 't1';
3838
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
39-
t1 ROCKSDB # Fixed # # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N
39+
t1 ROCKSDB # Fixed # # # # # # 6 # # NULL latin1_swedish_ci NULL 0 N
4040
INSERT INTO t1 VALUES (1000);
4141
Warnings:
4242
Warning 1264 Out of range value for column 'pk' at row 1
@@ -46,7 +46,7 @@ pk
4646
127
4747
SHOW TABLE STATUS LIKE 't1';
4848
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
49-
t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N
49+
t1 ROCKSDB # Fixed # # # # # # 127 # # NULL latin1_swedish_ci NULL 0 N
5050
INSERT INTO t1 VALUES ();
5151
ERROR 23000: Duplicate entry '127' for key 'PRIMARY'
5252
SELECT * FROM t1;
@@ -55,7 +55,7 @@ pk
5555
127
5656
SHOW TABLE STATUS LIKE 't1';
5757
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
58-
t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N
58+
t1 ROCKSDB # Fixed # # # # # # 127 # # NULL latin1_swedish_ci NULL 0 N
5959
INSERT INTO t1 VALUES ();
6060
ERROR 23000: Duplicate entry '127' for key 'PRIMARY'
6161
SELECT * FROM t1;
@@ -64,5 +64,5 @@ pk
6464
127
6565
SHOW TABLE STATUS LIKE 't1';
6666
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
67-
t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N
67+
t1 ROCKSDB # Fixed # # # # # # 127 # # NULL latin1_swedish_ci NULL 0 N
6868
DROP TABLE t1;

0 commit comments

Comments
 (0)