mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 08:15:31 +02:00
WL#2645 (CHECK TABLE FOR UPGRADE)
necessary implementation in the server mysql_upgrade script added client/mysqlcheck.c: --check-upgrade option added include/my_base.h: errcode added include/myisam.h: option added scripts/Makefile.am: mysql_upgrade script added sql/handler.cc: checks for old types/bugs added sql/handler.h: declarations regarding checks for upgrade sql/lex.h: sym added sql/share/errmsg.txt: error message added sql/slave.cc: now ha_repair is for public use sql/sql_table.cc: upgrade in ha_repair implemented sql/sql_yacc.yy: CHECK ... FOR UPGRADE added to syntax
This commit is contained in:
parent
74f6299efd
commit
bf84040458
12 changed files with 412 additions and 7 deletions
|
|
@ -46,6 +46,9 @@
|
|||
#define HA_ADMIN_TRY_ALTER -7
|
||||
#define HA_ADMIN_WRONG_CHECKSUM -8
|
||||
#define HA_ADMIN_NOT_BASE_TABLE -9
|
||||
#define HA_ADMIN_NEEDS_UPGRADE -10
|
||||
#define HA_ADMIN_NEEDS_ALTER -11
|
||||
#define HA_ADMIN_NEEDS_CHECK -12
|
||||
|
||||
/* Bits in table_flags() to show what database can do */
|
||||
|
||||
|
|
@ -702,10 +705,26 @@ public:
|
|||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
|
||||
virtual void update_create_info(HA_CREATE_INFO *create_info) {}
|
||||
protected:
|
||||
/* to be implemented in handlers */
|
||||
|
||||
/* admin commands - called from mysql_admin_table */
|
||||
virtual int check(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
{ return HA_ADMIN_NOT_IMPLEMENTED; }
|
||||
|
||||
/*
|
||||
in these two methods check_opt can be modified
|
||||
to specify CHECK option to use to call check()
|
||||
upon the table
|
||||
*/
|
||||
virtual int check_for_upgrade(HA_CHECK_OPT *check_opt)
|
||||
{ return 0; }
|
||||
public:
|
||||
int ha_check_for_upgrade(HA_CHECK_OPT *check_opt);
|
||||
int check_old_types();
|
||||
/* to be actually called to get 'check()' functionality*/
|
||||
int ha_check(THD *thd, HA_CHECK_OPT *check_opt);
|
||||
|
||||
virtual int backup(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
{ return HA_ADMIN_NOT_IMPLEMENTED; }
|
||||
/*
|
||||
|
|
@ -714,8 +733,11 @@ public:
|
|||
*/
|
||||
virtual int restore(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
{ return HA_ADMIN_NOT_IMPLEMENTED; }
|
||||
protected:
|
||||
virtual int repair(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
{ return HA_ADMIN_NOT_IMPLEMENTED; }
|
||||
public:
|
||||
int ha_repair(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
virtual int optimize(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
{ return HA_ADMIN_NOT_IMPLEMENTED; }
|
||||
virtual int analyze(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue