1set GLOBAL sql_mode=""; 2set LOCAL sql_mode=""; 3drop table if exists t1,t2,t3; 4create table t1(a int); 5insert into t1 values(1); 6ERROR at line 9: DELIMITER must be followed by a 'delimiter' character or string 7 8Test default delimiter ; 9a 101 11 12Test delimiter without arg 13 14Test delimiter : 15a 161 17 18Test delimiter : 19a 201 21 22Test delimiter :; 23a 241 25 26Test delimiter // 27a 281 29 30Test delimiter MySQL 31a 321 33 34Test delimiter delimiter 35a 361 37Tables_in_test 38t1 39t2 40t3 41Tables_in_test 42t1 43_ 44Test delimiter : from command line 45a 461 47_ 48Test delimiter :; from command line 49a 501 51_ 52Test 'go' command(vertical output) G 53*************************** 1. row *************************** 54a: 1 55_ 56Test 'go' command g 57a 581 59drop table t1; 60create table t1(a int); 61lock tables t1 write; 62database() 63test 64unlock tables; 65drop table t1; 66+----------------------+------------+--------+ 67| concat('>',col1,'<') | col2 | col3 | 68+----------------------+------------+--------+ 69| >a < | b | 123421 | 70| >a < | 0123456789 | 4 | 71| >abcd< | | 4 | 72+----------------------+------------+--------+ 73+-------------------+ 74| __tañgè Ñãmé | 75+-------------------+ 76| John Doe | 77+-------------------+ 78+-------------------+ 79| John Doe | 80+-------------------+ 81| __tañgè Ñãmé | 82+-------------------+ 83+------+------+---------------------------+ 84| i | j | k | 85+------+------+---------------------------+ 86| 1 | NULL | NULL | 87| NULL | NULL | <-----------------------> | 88| NULL | NULL | <----- | 89| NULL | NULL | Τη γλώσσα | 90| NULL | NULL | ᛖᚴ ᚷᛖᛏ | 91+------+------+---------------------------+ 92i j k 93NULL 1 NULL 94Field Type Null Key Default Extra 95i int(11) YES NULL 96j int(11) NO NULL 97k int(11) YES NULL 98+------+---+------+ 99| i | j | k | 100+------+---+------+ 101| NULL | 1 | NULL | 102+------+---+------+ 103+-------+---------+------+-----+---------+-------+ 104| Field | Type | Null | Key | Default | Extra | 105+-------+---------+------+-----+---------+-------+ 106| i | int(11) | YES | | NULL | | 107| j | int(11) | NO | | NULL | | 108| k | int(11) | YES | | NULL | | 109+-------+---------+------+-----+---------+-------+ 110i s1 1111 x 1122 NULL 1133 114+------+------+ 115| i | s1 | 116+------+------+ 117| 1 | x | 118| 2 | NULL | 119| 3 | | 120+------+------+ 121unhex('zz') 122NULL 123+-------------+ 124| unhex('zz') | 125+-------------+ 126| NULL | 127+-------------+ 128create table t1(a int, b varchar(255), c int); 129Field Type Null Key Default Extra 130a int(11) YES NULL 131b varchar(255) YES NULL 132c int(11) YES NULL 133Field Type Null Key Default Extra 134a int(11) YES NULL 135b varchar(255) YES NULL 136c int(11) YES NULL 137drop table t1; 1381 1391 140ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 141ERROR at line 1: USE must be followed by a database name 1421 +1 1432 1441 +1 1452 1461 +1 1472 1481 +1 1492 150\ 151\\ 152'; 153'; 154create table t17583 (a int); 155insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); 156insert into t17583 select a from t17583; 157insert into t17583 select a from t17583; 158insert into t17583 select a from t17583; 159insert into t17583 select a from t17583; 160insert into t17583 select a from t17583; 161insert into t17583 select a from t17583; 162insert into t17583 select a from t17583; 163select count(*) from t17583; 164count(*) 1651280 166drop table t17583; 167Test connect without db- or host-name => reconnect 168Test connect with dbname only => new dbname, old hostname 169ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'connecttest' at line 1 170Test connect with _invalid_ dbname only => new invalid dbname, old hostname 171ERROR 1049 (42000) at line 1: Unknown database 'invalid' 172ERROR 1049 (42000) at line 1: Unknown database 'invalid' 173Test connect with dbname + hostname 174Test connect with dbname + _invalid_ hostname 175ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) 176ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) 177The commands reported in the bug report 178ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) 179Too long dbname 180ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...' 181Too long hostname 182ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) 1831 1841 185ERROR at line 1: DELIMITER cannot contain a backslash character 186ERROR at line 1: DELIMITER cannot contain a backslash character 1871 1881 1891 1901 191This is a file starting with UTF8 BOM 0xEFBBBF 192This is a file starting with UTF8 BOM 0xEFBBBF 193delimiter 1941 1952 1962 1972 1982 199@z:='1' @z=database() 2001 NULL 2011 2021 2031 2041 205COUNT (*) 2061 207COUNT (*) 2081 209COUNT (*) 2101 211ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) 212End of 5.0 tests 213WARNING: --server-arg option not supported in this configuration. 214*************************** 1. row *************************** 2151: 1 2162: 2 2173: 3 2184: 4 2195: 5 2206: 6 2217: 7 2228: 8 2239: 9 2240: 0 2251: 1 2262: 2 2273: 3 2284: 4 2295: 5 2306: 6 2317: 7 2328: 8 2339: 9 2340: 0 2351: 1 2362: 2 2373: 3 2384: 4 2395: 5 2406: 6 2417: 7 2428: 8 2439: 9 2440: 0 2451: 1 2462: 2 2473: 3 2484: 4 2495: 5 2506: 6 2517: 7 2528: 8 2539: 9 2540: 0 2551: 1 2562: 2 2573: 3 2584: 4 2595: 5 2606: 6 2617: 7 2628: 8 2639: 9 2640: 0 2651: 1 2662: 2 2673: 3 2684: 4 2695: 5 2706: 6 2717: 7 2728: 8 2739: 9 2740: 0 2751: 1 2762: 2 2773: 3 2784: 4 2795: 5 2806: 6 2817: 7 2828: 8 2839: 9 2840: 0 2851: 1 2862: 2 2873: 3 2884: 4 2895: 5 2906: 6 2917: 7 2928: 8 2939: 9 2940: 0 2951: 1 2962: 2 2973: 3 2984: 4 2995: 5 3006: 6 3017: 7 3028: 8 3039: 9 3040: 0 3051: 1 3062: 2 3073: 3 3084: 4 3095: 5 3106: 6 3117: 7 3128: 8 3139: 9 3140: 0 3151: 1 3162: 2 3173: 3 3184: 4 3195: 5 3206: 6 3217: 7 3228: 8 3239: 9 3240: 0 3251: 1 3262: 2 3273: 3 3284: 4 3295: 5 3306: 6 3317: 7 3328: 8 3339: 9 3340: 0 3351: 1 3362: 2 3373: 3 3384: 4 3395: 5 3406: 6 3417: 7 3428: 8 3439: 9 3440: 0 3451: 1 3462: 2 3473: 3 3484: 4 3495: 5 3506: 6 3517: 7 3528: 8 3539: 9 3540: 0 3551: 1 3562: 2 3573: 3 3584: 4 3595: 5 3606: 6 3617: 7 3628: 8 3639: 9 3640: 0 3651: 1 3662: 2 3673: 3 3684: 4 3695: 5 3706: 6 3717: 7 3728: 8 3739: 9 3740: 0 3751: 1 3762: 2 3773: 3 3784: 4 3795: 5 3806: 6 3817: 7 3828: 8 3839: 9 3840: 0 3851: 1 3862: 2 3873: 3 3884: 4 3895: 5 3906: 6 3917: 7 3928: 8 3939: 9 3940: 0 3951: 1 3962: 2 3973: 3 3984: 4 3995: 5 4006: 6 4017: 7 4028: 8 4039: 9 4040: 0 405+---+ 406| 1 | 407+---+ 408| 1 | 409+---+ 410Warning (Code 1286): Unknown storage engine 'nonexistent' 411Warning (Code 1266): Using storage engine MyISAM for table 't2' 412Warning (Code 1286): Unknown storage engine 'nonexistent2' 413Warning (Code 1266): Using storage engine MyISAM for table 't2' 414Error (Code 1050): Table 't2' already exists 415drop tables t1, t2; 416Variable_name Value 417lc_messages ru_RU 418<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>create table t1 (a char(5)); 419insert into t1 values ('\0b\0'); 420a 421\0b\0 422a 423\0b\0 424+------+ 425| a | 426+------+ 427| b | 428+------+ 429*************************** 1. row *************************** 430a: b 431<TABLE BORDER=1><TR><TH>a</TH></TR><TR><TD> b </TD></TR></TABLE><?xml version="1.0"?> 432 433<resultset statement="select a from t1 434" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 435 <row> 436 <field name="a"> b </field> 437 </row> 438</resultset> 439drop table t1; 440 441Bug #47147: mysql client option --skip-column-names does not apply to vertical output 442 443*************************** 1. row *************************** 4441 445 446# 447# Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE 448# commands. 449# 450CREATE DATABASE connected_db; 451USE connected_db; 452SHOW TABLES; 453Tables_in_connected_db 454table_in_connected_db 455DROP DATABASE connected_db; 456 457# 458# Testing --one-database option 459# 460CREATE DATABASE connected_db; 461SHOW TABLES IN connected_db; 462Tables_in_connected_db 463t1 464SHOW TABLES IN test; 465Tables_in_test 466t1 467USE test; 468DROP TABLE t1; 469DROP DATABASE connected_db; 470 471SHOW TABLES IN test; 472Tables_in_test 473SHOW TABLES IN test1; 474Tables_in_test1 475DROP DATABASE test1; 476 477# 478# Checking --one-database option followed by the execution of 479# connect command. 480# 481CREATE DATABASE connected_db; 482SHOW TABLES IN connected_db; 483Tables_in_connected_db 484t1 485t2 486SHOW TABLES IN test; 487Tables_in_test 488t1 489t2 490DROP TABLE test.t1; 491DROP TABLE test.t2; 492DROP DATABASE connected_db; 493 494# 495# Checking --one-database option with no database specified 496# at command-line. 497# 498SHOW TABLES IN test; 499Tables_in_test 500 501# 502# Checking --one-database option with non_existent_db 503# specified with USE command 504# 505CREATE DATABASE connected_db; 506SHOW TABLES IN connected_db; 507Tables_in_connected_db 508table_in_connected_db 509 510SHOW TABLES IN connected_db; 511Tables_in_connected_db 512table_in_connected_db 513DROP DATABASE connected_db; 514create database `aa``bb````cc`; 515DATABASE() 516aa`bb``cc 517DATABASE() 518test 519DATABASE() 520aa`bb``cc 521DATABASE() 522test 523DATABASE() 524aa`bb``cc 525drop database `aa``bb````cc`; 526a 527>>\ndelimiter\n<< 528+-------------------+ 529| a | 530| aaaaaaaaaaaaaaaaa | 531+-------------------+ 532# 533# Start of 10.1 tests 534# 535# 536# MDEV-6572 "USE dbname" with a bad sequence erroneously connects to a wrong database 537# 538# 539# End of 10.1 tests 540# 541ERROR 1300 (HY000) at line 2: Invalid utf8 character string: 'test\xF0\x9F\x98\x81' 542set GLOBAL sql_mode=default; 543 544End of tests 545create table `a1\``b1` (a int); 546show tables; 547Tables_in_test 548a1\`b1 549insert `a1\``b1` values (1),(2); 550show create table `a1\``b1`; 551Table Create Table 552a1\`b1 CREATE TABLE `a1\``b1` ( 553 `a` int(11) DEFAULT NULL 554) ENGINE=MyISAM DEFAULT CHARSET=latin1 555/*!40101 SET @saved_cs_client = @@character_set_client */; 556/*!40101 SET character_set_client = utf8 */; 557CREATE TABLE `a1\``b1` ( 558 `a` int(11) DEFAULT NULL 559) ENGINE=MyISAM DEFAULT CHARSET=latin1; 560/*!40101 SET character_set_client = @saved_cs_client */; 561INSERT INTO `a1\``b1` VALUES (1),(2); 562insert `a1\``b1` values (4),(5); 563show create table `a1\``b1`; 564Table Create Table 565a1\`b1 CREATE TABLE `a1\``b1` ( 566 `a` int(11) DEFAULT NULL 567) ENGINE=MyISAM DEFAULT CHARSET=latin1 568select * from `a1\``b1`; 569a 5701 5712 572drop table `a1\``b1`; 573set sql_mode=ansi_quotes; 574create table "a1\""b1" (a int); 575show tables; 576Tables_in_test 577a1\"b1 578insert "a1\""b1" values (1),(2); 579show create table "a1\""b1"; 580Table Create Table 581a1\"b1 CREATE TABLE "a1\""b1" ( 582 "a" int(11) DEFAULT NULL 583) ENGINE=MyISAM DEFAULT CHARSET=latin1 584/*!40101 SET @saved_cs_client = @@character_set_client */; 585/*!40101 SET character_set_client = utf8 */; 586CREATE TABLE "a1\""b1" ( 587 "a" int(11) DEFAULT NULL 588); 589/*!40101 SET character_set_client = @saved_cs_client */; 590INSERT INTO "a1\""b1" VALUES (1),(2); 591insert "a1\""b1" values (4),(5); 592show create table "a1\""b1"; 593Table Create Table 594a1\"b1 CREATE TABLE "a1\""b1" ( 595 "a" int(11) DEFAULT NULL 596) ENGINE=MyISAM DEFAULT CHARSET=latin1 597select * from "a1\""b1"; 598a 5991 6002 601drop table "a1\""b1"; 602set sql_mode=default; 603create table t1 (a text); 604select count(*) from t1; 605count(*) 60641 607truncate table t1; 608select count(*) from t1; 609count(*) 61041 611truncate table t1; 612select count(*) from t1; 613count(*) 6140 615truncate table t1; 616select count(*) from t1; 617count(*) 6180 619truncate table t1; 620select count(*) from t1; 621count(*) 62241 623truncate table t1; 624select count(*) from t1; 625count(*) 6260 627truncate table t1; 628drop table t1; 629# 630# MDEV-15538 '-N' Produce html output wrong 631# 632<TABLE BORDER=1><TR><TD>1</TD></TR></TABLE>