diff options
author | unknown <sasha@mysql.sashanet.com> | 2000-09-14 16:34:50 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2000-09-14 16:34:50 -0600 |
commit | 2fdcf82ec5acae2bfd03ea00d1158ec5f9d51573 (patch) | |
tree | 6f789a128f7f2f981c423d22a6bebd80ccf71633 /sql/sql_yacc.yy | |
parent | 51fc63837a558cbf8d0ce6007012492dd71696de (diff) | |
download | mariadb-git-2fdcf82ec5acae2bfd03ea00d1158ec5f9d51573.tar.gz |
BACKUP TABLE TO 'directory'
RESTORE TABLE FROM 'directory'
log on slave when it connects to the master
include/mysql_com.h:
Added COM_CONNECT_OUT so we can log on the slave when
connects to the master
sql/ha_myisam.cc:
added restore() and backup()
sql/ha_myisam.h:
Added restore() and backup()
sql/handler.cc:
restore()/backup()
sql/handler.h:
restore()/backup()
sql/lex.h:
BACKUP/RESTORE
sql/mysql_priv.h:
gave global ( non-static) scope to generate_table()
added mysql_backup_table()/mysql_restore_table()
sql/slave.cc:
Log when slave connects to the master on the slave
sql/sql_delete.cc:
changed the scope of generate_table() from static to global
sql/sql_lex.h:
changes for BACKUP TABLE/RESTORE TABLE
sql/sql_parse.cc:
Changes for BACKUP TABLE/RESTORE TABLE
sql/sql_table.cc:
Changes for BACKUP TABLE/RESTORE TABLE
sql/sql_yacc.yy:
BACKUP TABLE/ RESTORE TABLE
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index d4fec1289ba..883b610d856 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -127,6 +127,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token AUTO_INC %token AUTOCOMMIT %token AVG_ROW_LENGTH +%token BACKUP_SYM %token BERKELEY_DB_SYM %token BINARY %token BIT_SYM @@ -237,6 +238,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token REGEXP %token RELOAD %token RENAME +%token RESTORE_SYM %token RESTRICT %token REVOKE %token ROWS_SYM @@ -488,7 +490,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); query verb_clause create change select drop insert replace insert2 insert_values update delete show describe load alter optimize flush begin commit rollback slave master_def master_defs - repair analyze check rename + repair restore backup analyze check rename field_list field_list_item field_spec kill select_item_list select_item values_list no_braces limit_clause delete_limit_clause fields opt_values values @@ -526,6 +528,7 @@ query: verb_clause: alter | analyze + | backup | begin | change | check @@ -544,6 +547,7 @@ verb_clause: | rename | repair | replace + | restore | revoke | rollback | select @@ -1084,6 +1088,26 @@ slave: Lex->type = 0; }; +restore: + RESTORE_SYM table_or_tables + { + Lex->sql_command = SQLCOM_RESTORE_TABLE; + } + table_list FROM TEXT_STRING + { + Lex->backup_dir = $6.str; + } +backup: + BACKUP_SYM table_or_tables + { + Lex->sql_command = SQLCOM_BACKUP_TABLE; + } + table_list TO_SYM TEXT_STRING + { + Lex->backup_dir = $6.str; + } + + repair: REPAIR table_or_tables { @@ -2348,6 +2372,7 @@ keyword: | AUTOCOMMIT {} | AVG_ROW_LENGTH {} | AVG_SYM {} + | BACKUP_SYM {} | BEGIN_SYM {} | BIT_SYM {} | BOOL_SYM {} @@ -2412,6 +2437,7 @@ keyword: | RAID_TYPE {} | RELOAD {} | REPAIR {} + | RESTORE_SYM {} | ROLLBACK_SYM {} | ROWS_SYM {} | ROW_FORMAT_SYM {} |