github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/dml/show/show.result (about) 1 drop database if exists test01; 2 create database test01; 3 use test01; 4 create table tt(col2 float comment '"%$^&*()_+@!\''); 5 show create table tt; 6 Table Create Table 7 tt CREATE TABLE `tt` (\n`col2` FLOAT DEFAULT NULL COMMENT '"%$^&*()_+@!'''\n) 8 drop table tt; 9 create table t1 (id int not null, str char(10),name varchar(10)); 10 create table t2 (a int); 11 show tables; 12 Tables_in_test01 13 t1 14 t2 15 show tables from test01; 16 Tables_in_test01 17 t1 18 t2 19 show columns from t1; 20 Field Type Null Key Default Extra Comment 21 id INT NO NULL 22 name VARCHAR(10) YES NULL 23 str CHAR(10) YES NULL 24 show full columns from t1; 25 Field Type Collation Null Key Default Extra Privileges Comment 26 id INT NULL NO NULL select,insert,update,references 27 name VARCHAR(10) NULL YES NULL select,insert,update,references 28 str CHAR(10) NULL YES NULL select,insert,update,references 29 show full columns from t1 like '%'; 30 Field Type Collation Null Key Default Extra Privileges Comment 31 id INT NULL NO NULL select,insert,update,references 32 name VARCHAR(10) NULL YES NULL select,insert,update,references 33 str CHAR(10) NULL YES NULL select,insert,update,references 34 show full columns from t1 where `Field`='id'; 35 Field Type Collation Null Key Default Extra Privileges Comment 36 id INT NULL NO NULL select,insert,update,references 37 drop database if exists test01; 38 show charset; 39 Charset Description Default collation Maxlen 40 drop database if exists test02; 41 create database test02; 42 use test02; 43 create table t1(a tinyint, b smallint, c int, d bigint); 44 create database test01; 45 use test01; 46 show columns from test02.t1; 47 Field Type Null Key Default Extra Comment 48 a TINYINT YES NULL 49 b SMALLINT YES NULL 50 c INT YES NULL 51 d BIGINT YES NULL 52 create database if not exists db11111111111; 53 show table status from db11111111111; 54 Name Engine 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 55 drop database db11111111111; 56 show variables where value = 'MatrixOne'; 57 Variable_name Value 58 version_comment MatrixOne 59 show grants; 60 Grants for dump@localhost 61 GRANT create account ON account `dump`@`localhost` 62 GRANT drop account ON account `dump`@`localhost` 63 GRANT alter account ON account `dump`@`localhost` 64 GRANT create user ON account `dump`@`localhost` 65 GRANT drop user ON account `dump`@`localhost` 66 GRANT alter user ON account `dump`@`localhost` 67 GRANT create role ON account `dump`@`localhost` 68 GRANT drop role ON account `dump`@`localhost` 69 GRANT create database ON account `dump`@`localhost` 70 GRANT drop database ON account `dump`@`localhost` 71 GRANT show databases ON account `dump`@`localhost` 72 GRANT connect ON account `dump`@`localhost` 73 GRANT manage grants ON account `dump`@`localhost` 74 GRANT account all ON account `dump`@`localhost` 75 GRANT show tables ON database * `dump`@`localhost` 76 GRANT create table ON database * `dump`@`localhost` 77 GRANT drop table ON database * `dump`@`localhost` 78 GRANT alter table ON database * `dump`@`localhost` 79 GRANT create view ON database * `dump`@`localhost` 80 GRANT drop view ON database * `dump`@`localhost` 81 GRANT alter view ON database * `dump`@`localhost` 82 GRANT database all ON database * `dump`@`localhost` 83 GRANT database ownership ON database * `dump`@`localhost` 84 GRANT select ON table *.* `dump`@`localhost` 85 GRANT insert ON table *.* `dump`@`localhost` 86 GRANT update ON table *.* `dump`@`localhost` 87 GRANT truncate ON table *.* `dump`@`localhost` 88 GRANT delete ON table *.* `dump`@`localhost` 89 GRANT reference ON table *.* `dump`@`localhost` 90 GRANT index ON table *.* `dump`@`localhost` 91 GRANT table all ON table *.* `dump`@`localhost` 92 GRANT table ownership ON table *.* `dump`@`localhost` 93 GRANT values ON table t `dump`@`localhost` 94 GRANT connect ON account `dump`@`localhost` 95 show grants for 'root'@'localhost'; 96 Grants for root@localhost 97 GRANT create account ON account `root`@`localhost` 98 GRANT drop account ON account `root`@`localhost` 99 GRANT alter account ON account `root`@`localhost` 100 GRANT create user ON account `root`@`localhost` 101 GRANT drop user ON account `root`@`localhost` 102 GRANT alter user ON account `root`@`localhost` 103 GRANT create role ON account `root`@`localhost` 104 GRANT drop role ON account `root`@`localhost` 105 GRANT create database ON account `root`@`localhost` 106 GRANT drop database ON account `root`@`localhost` 107 GRANT show databases ON account `root`@`localhost` 108 GRANT connect ON account `root`@`localhost` 109 GRANT manage grants ON account `root`@`localhost` 110 GRANT account all ON account `root`@`localhost` 111 GRANT show tables ON database * `root`@`localhost` 112 GRANT create table ON database * `root`@`localhost` 113 GRANT drop table ON database * `root`@`localhost` 114 GRANT alter table ON database * `root`@`localhost` 115 GRANT create view ON database * `root`@`localhost` 116 GRANT drop view ON database * `root`@`localhost` 117 GRANT alter view ON database * `root`@`localhost` 118 GRANT database all ON database * `root`@`localhost` 119 GRANT database ownership ON database * `root`@`localhost` 120 GRANT select ON table *.* `root`@`localhost` 121 GRANT insert ON table *.* `root`@`localhost` 122 GRANT update ON table *.* `root`@`localhost` 123 GRANT truncate ON table *.* `root`@`localhost` 124 GRANT delete ON table *.* `root`@`localhost` 125 GRANT reference ON table *.* `root`@`localhost` 126 GRANT index ON table *.* `root`@`localhost` 127 GRANT table all ON table *.* `root`@`localhost` 128 GRANT table ownership ON table *.* `root`@`localhost` 129 GRANT values ON table t `root`@`localhost` 130 GRANT connect ON account `root`@`localhost` 131 show grants for 'test'@'localhost'; 132 Grants for test@localhost 133 create role role1; 134 grant all on table *.* to role1; 135 grant create table, drop table on database *.* to role1; 136 create user user1 identified by 'pass1'; 137 grant role1 to user1; 138 show grants for 'user1'@'localhost'; 139 Grants for user1@localhost 140 GRANT connect ON account `user1`@`localhost` 141 GRANT table all ON table *.* `user1`@`localhost` 142 GRANT create table ON database *.* `user1`@`localhost` 143 GRANT drop table ON database *.* `user1`@`localhost` 144 drop user user1; 145 drop role role1; 146 create database if not exists test03; 147 use test03; 148 drop view if exists v1; 149 drop table if exists t1; 150 create table t1(a int, b int); 151 insert into t1 values(1,1); 152 create view v1 as select * from t1; 153 show full tables; 154 Tables_in_test03 table_type 155 t1 BASE TABLE 156 v1 VIEW 157 show full tables from test03; 158 Tables_in_test03 table_type 159 t1 BASE TABLE 160 v1 VIEW 161 show full tables from `1;drop table t1;`; 162 invalid database 1;drop table t1; 163 show tables like `1;drop table t1;`; 164 invalid input: column 1;drop table t1; does not exist 165 show full tables from "1;drop table t1;"; 166 SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 40 near " "1;drop table t1;";"; 167 show create database `1;drop table t1;`; 168 invalid database 1;drop table t1; 169 show create table `1;drop table t1;`; 170 no such table test03.1;drop table t1; 171 show columns from `1;drop table t1;`; 172 no such table test03.1;drop table t1; 173 show table status from `1;drop table t1;`; 174 invalid database 1;drop table t1; 175 show index from `1;drop table t1;`; 176 no such table test03.1;drop table t1; 177 show variables like `1;drop table t1;`; 178 Variable_name Value 179 select * from t1; 180 a b 181 1 1 182 show collation; 183 Collation Charset Id Compiled Sortlen 184 utf8mb4_bin utf8mb4 46 Yes 1 185 show collation like '%'; 186 Collation Charset Id Compiled Sortlen 187 utf8mb4_bin utf8mb4 46 Yes 1 188 show collation where 'Charset'='utf8mb4'; 189 Collation Charset Id Compiled Sortlen 190 utf8mb4_bin utf8mb4 46 Yes 1 191 show variables like 'sql_safe_updates'; 192 Variable_name Value 193 sql_safe_updates 0 194 set sql_safe_updates=1; 195 show variables like 'sql_safe_updates'; 196 Variable_name Value 197 sql_safe_updates 1 198 set autocommit = on; 199 show variables like 'autocommit'; 200 Variable_name Value 201 autocommit on 202 set autocommit = off; 203 show variables like 'autocommit'; 204 Variable_name Value 205 autocommit off 206 set autocommit = 1; 207 show variables like 'autocommit'; 208 Variable_name Value 209 autocommit on 210 drop table if exists t1; 211 create table t1(c1 int primary key auto_increment,c2 tinyint not null default 4,c3 smallint,c4 bigint,c5 tinyint unsigned,c6 smallint unsigned,c7 int unsigned,c8 bigint unsigned,c9 float,c10 double,c11 date,c12 datetime,c13 timestamp on update current_timestamp,c14 char,c15 varchar default 'q',c16 json,c17 decimal,c18 text,c19 blob,c20 uuid); 212 show create table t1; 213 Table Create Table 214 t1 CREATE TABLE `t1` (\n`c1` INT NOT NULL AUTO_INCREMENT,\n`c2` TINYINT DEFAULT 4,\n`c3` SMALLINT DEFAULT NULL,\n`c4` BIGINT DEFAULT NULL,\n`c5` TINYINT UNSIGNED DEFAULT NULL,\n`c6` SMALLINT UNSIGNED DEFAULT NULL,\n`c7` INT UNSIGNED DEFAULT NULL,\n`c8` BIGINT UNSIGNED DEFAULT NULL,\n`c9` FLOAT DEFAULT NULL,\n`c10` DOUBLE DEFAULT NULL,\n`c11` DATE DEFAULT NULL,\n`c12` DATETIME DEFAULT NULL,\n`c13` TIMESTAMP DEFAULT NULL ON UPDATE current_timestamp(),\n`c14` CHAR(1) DEFAULT NULL,\n`c15` VARCHAR(65535) DEFAULT 'q',\n`c16` JSON DEFAULT NULL,\n`c17` DECIMAL(34,0) DEFAULT NULL,\n`c18` TEXT DEFAULT NULL,\n`c19` BLOB DEFAULT NULL,\n`c20` UUID DEFAULT NULL,\nPRIMARY KEY (`c1`)\n) 215 SHOW TRIGGERS; 216 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation 217 SHOW TRIGGERS like '*%'; 218 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation 219 use mo_catalog; 220 show tables; 221 Tables_in_mo_catalog 222 mo_tables 223 mo_user 224 mo_account 225 mo_role 226 mo_user_grant 227 mo_role_grant 228 mo_role_privs 229 mo_user_defined_function 230 mo_mysql_compatbility_mode 231 mo_database 232 mo_columns 233 show table_number from mo_catalog; 234 Number of tables in mo_catalog 235 11 236 show column_number from mo_database; 237 Number of columns in mo_database 238 8 239 show column_number from hdjshdj; 240 no such table mo_catalog.hdjshdj 241 drop database if exists test01; 242 create database test01; 243 use test01; 244 create table t(a int, b int); 245 insert into t values(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6); 246 show table_values from t; 247 max(a) min(a) max(b) min(b) 248 6 1 6 1 249 drop table t; 250 show node list; 251 1 252 show locks; 253 1 254 create role role1; 255 grant all on table *.* to role1; 256 grant create table, drop table on database *.* to role1; 257 create user user1 identified by 'pass1'; 258 grant role1 to user1; 259 show grants for 'user1'@'localhost'; 260 Grants for user1@localhost 261 GRANT connect ON account `user1`@`localhost` 262 GRANT table all ON table *.* `user1`@`localhost` 263 GRANT create table ON database *.* `user1`@`localhost` 264 GRANT drop table ON database *.* `user1`@`localhost` 265 show grants for ROLE role1; 266 Grants for role1 267 GRANT table all ON table *.* `role1` 268 GRANT create table ON database *.* `role1` 269 GRANT drop table ON database *.* `role1` 270 drop user user1; 271 drop role role1; 272 drop database if exists test01; 273 create database test01; 274 use test01; 275 create table t1(a int unique key, b int, c int); 276 show table_number from test01; 277 Number of tables in test01 278 1 279 drop table t1; 280 drop database if exists test01; 281 create database test01; 282 use test01; 283 create table t(a int, b int, c json); 284 insert into t values(1, 1, '{"a":1,"b":2,"c":3}'), (2, 2, '{"a":1,"b":2,"c":3}'), (3, 3, '{"a":1,"b":2,"c":3}'), (4, 4, '{"a":1,"b":2,"c":3}'), (5, 5, '{"a":1,"b":2,"c":3}'), (6, 6, '{"a":1,"b":2,"c":3}'); 285 show table_values from t; 286 max(a) min(a) max(b) min(b) max(c) min(c) 287 6 1 6 1 null null 288 drop table t; 289 create database `.quote`; 290 show tables from `.quote`; 291 Tables_in_.quote 292 drop database if exists `.quote`; 293 drop database if exists showDB; 294 create database showDB; 295 use showDB; 296 create table a (a int,b int); 297 create view va as select a from a; 298 begin; 299 show create table a; 300 Table Create Table 301 a CREATE TABLE `a` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL\n) 302 show create table va; 303 View Create View 304 va create view va as select a from a; 305 show create view va; 306 View Create View 307 va create view va as select a from a; 308 show collation; 309 Collation Charset Id Compiled Sortlen 310 utf8mb4_bin utf8mb4 46 Yes 1 311 show collation like '%'; 312 Collation Charset Id Compiled Sortlen 313 utf8mb4_bin utf8mb4 46 Yes 1 314 rollback; 315 drop database if exists showDb; 316 DROP DATABASE IF EXISTS test; 317 CREATE DATABASE test; 318 USE test; 319 DROP TABLE IF EXISTS show_01; 320 CREATE TABLE show_01(sname varchar(30),id int); 321 show INDEX FROM show_01; 322 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Visible Expression 323 show_01 0 id 1 id A 0 NULL NULL YES YES NULL 324 show_01 0 sname 1 sname A 0 NULL NULL YES YES NULL 325 show_01 0 __mo_rowid 1 __mo_rowid A 0 NULL NULL NO Physical address NO NULL 326 DROP TABLE show_01; 327 DROP TABLE IF EXISTS show_02; 328 CREATE TABLE show_02 ( 329 h1 varchar(16) NOT NULL default '', 330 u1 varchar(16) NOT NULL default '', 331 PRIMARY KEY (h1,u1) 332 ); 333 show INDEX FROM show_02; 334 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Visible Expression 335 show_02 0 h1 1 h1 A 0 NULL NULL NO YES NULL 336 show_02 0 u1 1 u1 A 0 NULL NULL NO YES NULL 337 show_02 1 PRIMARY 1 __mo_cpkey_002h1002u1 A 0 NULL NULL NO YES NULL 338 show_02 0 __mo_rowid 1 __mo_rowid A 0 NULL NULL NO Physical address NO NULL 339 DROP TABLE show_02; 340 DROP TABLE IF EXISTS show_03; 341 CREATE TABLE show_03(a int, b int); 342 CREATE unique index x ON show_03(a) comment 'x'; 343 show CREATE table show_03; 344 Table Create Table 345 show_03 CREATE TABLE `show_03` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL,\nUNIQUE KEY `x` (`a`) COMMENT `x`\n) 346 show INDEX FROM show_03; 347 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Visible Expression 348 show_03 0 __mo_rowid 1 __mo_rowid A 0 NULL NULL NO Physical address NO NULL 349 show_03 0 a 1 a A 0 NULL NULL YES YES NULL 350 show_03 0 b 1 b A 0 NULL NULL YES YES NULL 351 DROP TABLE show_03; 352 CREATE TABLE show_04(a int, b int, unique key(a)); 353 show CREATE TABLE show_04; 354 Table Create Table 355 show_04 CREATE TABLE `show_04` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL,\nUNIQUE KEY `a` (`a`)\n) 356 CREATE INDEX b ON show_04(b); 357 show INDEX FROM show_04; 358 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Visible Expression 359 show_04 0 a 1 a A 0 NULL NULL YES YES NULL 360 show_04 0 b 1 b A 0 NULL NULL YES YES NULL 361 show_04 0 __mo_rowid 1 __mo_rowid A 0 NULL NULL NO Physical address NO NULL 362 DROP TABLE show_04; 363 DROP DATABASE IF EXISTS show_03; 364 365 USE show_03; 366 367 delimiter $$ 368 CREATE FUNCTION myfun(ia int,ib int) returns int 369 BEGIN 370 RETURN ia + ib; 371 372 end 373 $$ 374 delimiter; 375 376 show FUNCTION status; 377 378 show FUNCTION status LIKE 'pattern'; 379 380 show FUNCTION status where db = 'show_03'; 381 382 DROP DATABASE test; 383 create database test; 384 use test; 385 drop table if exists t1; 386 create table t1(a int, b int, c int, primary key(a)); 387 show columns from t1; 388 Field Type Null Key Default Extra Comment 389 a INT NO PRI NULL 390 b INT YES NULL 391 c INT YES NULL 392 drop table t1; 393 drop table if exists t2; 394 create table t2(a int, b int, c int, primary key(a, b)); 395 show columns from t2; 396 Field Type Null Key Default Extra Comment 397 a INT NO PRI NULL 398 b INT NO PRI NULL 399 c INT YES NULL 400 drop table t2; 401 drop table if exists t3; 402 create table t3(a int, b int, c int, primary key(a, b, c)); 403 show columns from t3; 404 Field Type Null Key Default Extra Comment 405 a INT NO PRI NULL 406 b INT NO PRI NULL 407 c INT NO PRI NULL 408 drop table t3; 409 drop database test;