Commit e42b79de authored by unknown's avatar unknown

Merge moonbone.local:/work/tmp_merge-4.1-opt-mysql

into  moonbone.local:/work/tmp_merge-5.0-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/time.cc:
  Manual merge
parents fc942fbd 5ac65c9b
......@@ -1084,7 +1084,7 @@ static int read_and_execute(bool interactive)
(We want to allow help, print and clear anywhere at line start
*/
if ((named_cmds || glob_buffer.is_empty())
&& !in_string && (com=find_command(line,0)))
&& !ml_comment && !in_string && (com=find_command(line,0)))
{
if ((*com->func)(&glob_buffer,line) > 0)
break;
......
......@@ -564,3 +564,9 @@ TIME_FORMAT("24:00:00", '%l %p')
SELECT TIME_FORMAT("25:00:00", '%l %p');
TIME_FORMAT("25:00:00", '%l %p')
1 AM
SELECT DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896);
DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896)
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '%Y-%m-%d %H:%i:%s'
"End of 4.1 tests"
1
1
ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
ERROR at line 1: USE must be followed by a database name
......@@ -290,7 +290,6 @@ drop table t1;
select str_to_date( 1, NULL );
select str_to_date( NULL, 1 );
select str_to_date( 1, IF(1=1,NULL,NULL) );
# End of 4.1 tests
#
# Bug#11326
......@@ -321,3 +320,10 @@ SELECT TIME_FORMAT("12:00:00", '%l %p');
SELECT TIME_FORMAT("23:00:00", '%l %p');
SELECT TIME_FORMAT("24:00:00", '%l %p');
SELECT TIME_FORMAT("25:00:00", '%l %p');
#
# Bug#20729: Bad date_format() call makes mysql server crash
#
SELECT DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896);
--echo "End of 4.1 tests"
# This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc
#
# Bug #20432: mysql client interprets commands in comments
#
# if the client sees the 'use' within the comment, we haven't fixed
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
# SQL can have embedded comments => workie
--exec echo "select /*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/ 1" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
# client commands on the other hand must be at BOL => error
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "xxx" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec echo "*/ use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
--error 1
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
# client comment recognized, but parameter missing => error
--exec echo "use" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment