dble icon indicating copy to clipboard operation
dble copied to clipboard

Incorrect result on `show table status`when using `like`

Open FlyingMao opened this issue 6 years ago • 2 comments

version: 5.6.29-dble-2.18.02.1-dev-20180427184625 steps step1:prepare table

mysql> create table aly_order (ID int(11),O_ORDERKEY varchar(20) primary key,O_CUSTKEY varchar(20),O_TOTALPRICE int(20),MYDATE date);
Query OK, 0 rows affected (0.25 sec)

mysql> create table aly_test (ID int(11),R_REGIONKEY int(11) primary key,R_NAME varchar(50),R_COMMENT varchar(50));
Query OK, 0 rows affected (0.24 sec)

mysql> CREATE TABLE a_test(`id` int(10) unsigned NOT NULL,`t_id` int(10) unsigned NOT NULL DEFAULT '0',`name` char(120) NOT NULL DEFAULT '',`pad` int(11) NOT NULL,PRIMARY KEY (`id`),KEY `k_1` (`t_id`))DEFAULT CHARSET=UTF8
    -> ;
Query OK, 0 rows affected (0.40 sec)

step2:execute show in dble

mysql> show table status like 'aly_o%';
+---------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| 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 |
+---------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| a_test        | InnoDB | 10      | Compact    | 0    | 0              | 16384       | 0               | 0            | 0         |                | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | utf8_general_ci |          |                |         |
| dble_sequence | InnoDB | 10      | Compact    | 0    | 0              | 16384       | 0               | 0            | 0         |                | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | utf8_general_ci |          |                |         |
| aly_order     | InnoDB | 10      | Compact    | 0    | 0              | 16384       | 0               | 0            | 0         |                | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | utf8_general_ci |          |                |         |
| aly_test      | InnoDB | 10      | Compact    | 0    | 0              | 16384       | 0               | 0            | 0         |                | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | 1970-01-01 00:00:00 | utf8_general_ci |          |                |         |
+---------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
4 rows in set (0.00 sec)

step3:execute show in mysql

mysql> show table status like 'aly_o%';                                                                                                           
+-----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+
| 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 |
+-----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+
| aly_order | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |            0 |         0 |           NULL | 2018-05-04 18:05:02 | NULL        | NULL       | utf8_general_ci |     NULL |                |         |
+-----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+
1 row in set (0.01 sec)

FlyingMao avatar May 04 '18 10:05 FlyingMao

"show table status"'s result is faked for supporting client SQLyog,

yanhuqing666 avatar May 10 '18 07:05 yanhuqing666

Related case: 1.show.sql:id:14、15

FlyingMao avatar May 11 '18 03:05 FlyingMao