mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 20:11:42 +01:00
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0
This commit is contained in:
commit
2364ac071e
4 changed files with 133 additions and 1 deletions
50
mysql-test/r/mysql.result
Normal file
50
mysql-test/r/mysql.result
Normal file
|
@ -0,0 +1,50 @@
|
|||
drop table if exists t1;
|
||||
create table t1(a int);
|
||||
insert into t1 values(1);
|
||||
|
||||
Test default delimiter ;
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter without arg
|
||||
|
||||
Test delimiter :
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter :
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter :;
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter //
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter MySQL
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter delimiter
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter : from command line
|
||||
a
|
||||
1
|
||||
|
||||
Test delimiter :; from command line
|
||||
a
|
||||
1
|
||||
|
||||
Test 'go' command(vertical output) G
|
||||
*************************** 1. row ***************************
|
||||
a: 1
|
||||
|
||||
Test 'go' command g
|
||||
a
|
||||
1
|
||||
drop table t1;
|
34
mysql-test/t/mysql.test
Normal file
34
mysql-test/t/mysql.test
Normal file
|
@ -0,0 +1,34 @@
|
|||
#
|
||||
# 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;
|
48
mysql-test/t/mysql_delimiter.sql
Normal file
48
mysql-test/t/mysql_delimiter.sql
Normal file
|
@ -0,0 +1,48 @@
|
|||
|
||||
# Test default delimiter ;
|
||||
select "Test default delimiter ;" as " ";
|
||||
select * from t1;
|
||||
|
||||
# Test delimiter without argument
|
||||
select "Test delimiter without arg" as " ";
|
||||
# Nothing should be displayed, error is returned
|
||||
delimiter
|
||||
delimiter ; # Reset delimiter
|
||||
|
||||
# Test delimiter :
|
||||
select "Test delimiter :" as " ";
|
||||
delimiter :
|
||||
select * from t1:
|
||||
delimiter ; # Reset delimiter
|
||||
|
||||
# Test delimiter ':'
|
||||
select "Test delimiter :" as " ";
|
||||
delimiter ':'
|
||||
select * from t1:
|
||||
delimiter ; # Reset delimiter
|
||||
|
||||
# Test delimiter :;
|
||||
select "Test delimiter :;" as " ";
|
||||
delimiter :;
|
||||
select * from t1 :;
|
||||
delimiter ; # Reset delimiter
|
||||
|
||||
## Test delimiter //
|
||||
select "Test delimiter //" as " ";
|
||||
delimiter //
|
||||
select * from t1//
|
||||
delimiter ; # Reset delimiter
|
||||
|
||||
# Test delimiter 'MySQL'
|
||||
select "Test delimiter MySQL" as " ";
|
||||
delimiter 'MySQL'
|
||||
select * from t1MySQL
|
||||
delimiter ; # Reset delimiter
|
||||
|
||||
# Test delimiter 'delimiter'(should be allowed according to the code)
|
||||
select "Test delimiter delimiter" as " ";
|
||||
delimiter delimiter
|
||||
select * from t1 delimiter
|
||||
delimiter ; # Reset delimiter
|
||||
|
||||
|
|
@ -395,7 +395,7 @@ SignalLoggerManager::log(BlockNumber bno, const char * msg, ...)
|
|||
va_start(ap, msg);
|
||||
fprintf(outputStream, "%s: ", getBlockName(bno, "API"));
|
||||
vfprintf(outputStream, msg, ap);
|
||||
fprintf(outputStream, "\n", msg);
|
||||
fprintf(outputStream, "\n");
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue