Commit 16ccd69d authored by unknown's avatar unknown

Added SHOW MASTER LOGS as synonym for SHOW BINARY LOGS.

Added PURGE BINARY LOGS as synonym for PURGE MASTER LOGS.
Removed PURGE LOGS (now PURGE MASTER LOGS).
Added SHOW BDB LOGS as synonym for SHOW LOGS.
Note: tests key_cache.test hanged, rpl_log_pos.test, rpl_rotate_logs.test failed for me.
For the second and third one I guess this will disappear after merging 4.0.


mysql-test/r/rpl_rotate_logs.result:
  result update
mysql-test/t/rpl_rotate_logs.test:
  added test for synonym PURGE BINARY LOGS, changed PURGE LOGS to
  PURGE MASTER LOGS.
sql/sql_yacc.yy:
  Added SHOW MASTER LOGS as synonym for SHOW BINARY LOGS.
  Added PURGE BINARY LOGS as synonym for PURGE MASTER LOGS.
  Removed PURGE LOGS (now PURGE MASTER LOGS).
  Added SHOW BDB LOGS as synonym for SHOW LOGS.
parent f5666ffa
......@@ -41,11 +41,16 @@ insert into t2 values(NULL);
set global sql_slave_skip_counter=1;
start slave;
purge master logs to 'master-bin.000002';
show master logs;
Log_name
master-bin.000002
master-bin.000003
purge binary logs to 'master-bin.000002';
show binary logs;
Log_name
master-bin.000002
master-bin.000003
purge logs before now();
purge master logs before now();
show binary logs;
Log_name
master-bin.000003
......
......@@ -90,9 +90,12 @@ connection master;
sync_slave_with_master;
connection master;
purge master logs to 'master-bin.000002';
show master logs;
# we just tests if synonyms are accepted
purge binary logs to 'master-bin.000002';
show binary logs;
--sleep 1;
purge logs before now();
purge master logs before now();
show binary logs;
insert into t2 values (65);
sync_slave_with_master;
......
......@@ -3742,7 +3742,7 @@ show_param:
Lex->mi.pos = $12;
Lex->mi.server_id = $16;
}
| BINARY LOGS_SYM
| master_or_binary LOGS_SYM
{
Lex->sql_command = SQLCOM_SHOW_BINLOGS;
}
......@@ -3802,6 +3802,8 @@ show_param:
{ Lex->sql_command= SQLCOM_SHOW_CHARSETS; }
| COLLATION_SYM wild
{ Lex->sql_command= SQLCOM_SHOW_COLLATIONS; }
| BERKELEY_DB_SYM LOGS_SYM
{ Lex->sql_command= SQLCOM_SHOW_LOGS; }
| LOGS_SYM
{ Lex->sql_command= SQLCOM_SHOW_LOGS; }
| GRANTS FOR_SYM user
......@@ -3832,6 +3834,10 @@ show_param:
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
};
master_or_binary:
MASTER_SYM
| BINARY;
opt_db:
/* empty */ { $$= 0; }
| from_or_in ident { $$= $2.str; };
......@@ -3949,8 +3955,7 @@ purge:
;
purge_options:
LOGS_SYM purge_option
| MASTER_SYM LOGS_SYM purge_option
master_or_binary LOGS_SYM purge_option
;
purge_option:
......
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