mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
sql_yacc.yy:
Bug #10308: Parse 'purge master logs' with subselect correctly. subselect.test: Bug #10308: Test for 'purge master logs' with subselect. subselect.result: Bug #10308: Test result for 'purge master logs' with subselect.
This commit is contained in:
parent
8d01ea1be7
commit
c248a36e30
3 changed files with 11 additions and 1 deletions
|
@ -2834,3 +2834,4 @@ a
|
||||||
3
|
3
|
||||||
4
|
4
|
||||||
DROP TABLE t1,t2,t3;
|
DROP TABLE t1,t2,t3;
|
||||||
|
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||||
|
|
|
@ -1814,4 +1814,10 @@ SELECT * FROM t1
|
||||||
|
|
||||||
DROP TABLE t1,t2,t3;
|
DROP TABLE t1,t2,t3;
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG #10308: purge log with subselect
|
||||||
|
#
|
||||||
|
|
||||||
|
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
|
@ -4715,7 +4715,10 @@ purge_option:
|
||||||
}
|
}
|
||||||
| BEFORE_SYM expr
|
| BEFORE_SYM expr
|
||||||
{
|
{
|
||||||
if ($2->check_cols(1) || $2->fix_fields(Lex->thd, 0, &$2))
|
if (!$2)
|
||||||
|
/* Can only be an out of memory situation, no need for a message */
|
||||||
|
YYABORT;
|
||||||
|
if ($2->fix_fields(Lex->thd, 0, &$2) || $2->check_cols(1))
|
||||||
{
|
{
|
||||||
net_printf(Lex->thd, ER_WRONG_ARGUMENTS, "PURGE LOGS BEFORE");
|
net_printf(Lex->thd, ER_WRONG_ARGUMENTS, "PURGE LOGS BEFORE");
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
|
Loading…
Add table
Reference in a new issue