summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql.test
blob: c1d9813ea39c8f81efc092b074c054bf1ef171e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# Testing the MySQL command line client(mysql)
#

--disable_warnings
drop table if exists t1;
--enable_warnings

#
# Test the "delimiter" functionality
# Bug#9879
#
create table t1(a int);
insert into t1 values(1);

# Test delimiters
--exec $MYSQL test < "./t/mysql_delimiter.sql"

--disable_query_log
# Test delimiter : supplied on the command line
select "Test delimiter : from command line" as " ";
--exec $MYSQL test --delimiter=':' -e 'select * from t1:'
# Test delimiter :; supplied on the command line
select "Test delimiter :; from command line" as " ";
--exec $MYSQL test --delimiter=':;' -e 'select * from t1:;'
# Test 'go' command (vertical output) \G
select "Test 'go' command(vertical output) \G" as " ";
--exec $MYSQL test -e 'select * from t1\G'
# Test 'go' command \g
select "Test  'go' command \g" as " ";
--exec $MYSQL test -e 'select * from t1\g'
--enable_query_log
drop table t1;

#
# BUG9998 - MySQL client hangs on USE "database"
#
create table t1(a int);
lock tables t1 write;
--exec $MYSQL -e 'use test; select database();'
unlock tables;
drop table t1;