2007-11-02 13:40:34 +03:00
|
|
|
# This test should work in embedded server after we fix mysqltest
|
|
|
|
-- source include/not_embedded.inc
|
2019-08-30 16:06:54 +03:00
|
|
|
|
2007-11-02 13:40:34 +03:00
|
|
|
###################### mysql_comments.test #############################
|
|
|
|
# #
|
|
|
|
# Testing of comments handling by the command line client (mysql) #
|
|
|
|
# #
|
|
|
|
# Creation: #
|
|
|
|
# 2007-10-29 akopytov Implemented this test as a part of fixes for #
|
|
|
|
# bug #26215 and bug #11230 #
|
|
|
|
# #
|
|
|
|
########################################################################
|
|
|
|
|
2015-08-11 18:45:38 +02:00
|
|
|
set global sql_mode="";
|
|
|
|
|
2007-11-02 13:40:34 +03:00
|
|
|
#
|
|
|
|
# Bug #11230: Keeping comments when storing stored procedures
|
|
|
|
#
|
|
|
|
|
|
|
|
# See the content of mysql_comments.sql
|
|
|
|
# Set the test database to a known state before running the tests.
|
|
|
|
--disable_warnings
|
|
|
|
drop table if exists t1;
|
|
|
|
drop function if exists foofct;
|
|
|
|
drop procedure if exists empty;
|
|
|
|
drop procedure if exists foosp;
|
|
|
|
drop procedure if exists nicesp;
|
|
|
|
drop trigger if exists t1_empty;
|
|
|
|
drop trigger if exists t1_bi;
|
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
# Test without comments
|
|
|
|
--echo "Pass 1 : --disable-comments"
|
2016-10-02 15:35:08 +03:00
|
|
|
--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]{2})*/--TIME--/
|
2019-09-02 14:06:56 +03:00
|
|
|
--exec $MYSQL --default-character-set=latin1 --disable-comments test 2>&1 < "./main/mysql_comments.sql"
|
2007-11-02 13:40:34 +03:00
|
|
|
|
|
|
|
# Test with comments
|
|
|
|
--echo "Pass 2 : --enable-comments"
|
2016-10-02 15:35:08 +03:00
|
|
|
--replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]{2})*/--TIME--/
|
2019-09-02 14:06:56 +03:00
|
|
|
--exec $MYSQL --default-character-set=latin1 --enable-comments test 2>&1 < "./main/mysql_comments.sql"
|
2015-08-11 18:45:38 +02:00
|
|
|
|
|
|
|
set global sql_mode=default;
|
2007-11-02 13:40:34 +03:00
|
|
|
--echo End of 5.0 tests
|