diff options
author | unknown <monty@donna.mysql.fi> | 2001-04-20 17:14:53 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-04-20 17:14:53 +0300 |
commit | 4c5dd2f27801294f716567995c0d6e625670a9a7 (patch) | |
tree | 52cd3e429150d5231543e4b56d722a880ee48946 | |
parent | bcb85027cd2358f4776769e1f776e3865430ebdc (diff) | |
download | mariadb-git-4c5dd2f27801294f716567995c0d6e625670a9a7.tar.gz |
Fixed that database name is shown for CHECK TABLE
BitKeeper/etc/ignore:
Added client/mysqlcheck to the ignore list
Docs/manual.texi:
Changelog
-rw-r--r-- | .bzrignore | 1 | ||||
-rw-r--r-- | Docs/manual.texi | 7 | ||||
-rw-r--r-- | include/myisam.h | 6 | ||||
-rw-r--r-- | sql/ha_myisam.cc | 16 |
4 files changed, 23 insertions, 7 deletions
diff --git a/.bzrignore b/.bzrignore index 5fa3658e1ff..502efd1f30a 100644 --- a/.bzrignore +++ b/.bzrignore @@ -247,3 +247,4 @@ bdb/dist/config.hin innobase/ib_config.h innobase/ib_config.h.in mysql.proj +client/mysqlcheck diff --git a/Docs/manual.texi b/Docs/manual.texi index 33feca440fc..0a8e9818ae8 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -43897,7 +43897,7 @@ users uses this code as the rest of the code and because of this we are not yet 100% confident in this code. @menu -* News-3.23.38:: +* News-3.23.38:: Changes in release 3.23.38 * News-3.23.37:: Changes in release 3.23.37 * News-3.23.36:: Changes in release 3.23.36 * News-3.23.35:: Changes in release 3.23.35 @@ -43943,6 +43943,11 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.38 @itemize @bullet @item +New program @code{mysqlcheck}. +@item +Added database name to output for admin commands like @code{CHECK}, +@code{REPAIR}, @code{OPTIMIZE}. +@item Lots of portability fixes for InnoDB. @item Changed optimizer so that queries like diff --git a/include/myisam.h b/include/myisam.h index c4e26c5fb22..9b006467ac8 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -333,9 +333,9 @@ typedef struct st_mi_check_param ulonglong unique_count[MI_MAX_KEY_SEG+1]; ha_checksum key_crc[MI_MAX_POSSIBLE_KEY]; ulong rec_per_key_part[MI_MAX_KEY_SEG*MI_MAX_POSSIBLE_KEY]; - void* thd; - char* table_name; - char* op_name; + void *thd; + char *db_name,*table_name; + char *op_name; } MI_CHECK; diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index b6cfc2c3612..6409ec5d019 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -50,10 +50,12 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, { THD* thd = (THD*)param->thd; String* packet = &thd->packet; - packet->length(0); + uint length; char msgbuf[MI_MAX_MSG_BUF]; - msgbuf[0] = 0; + char name[NAME_LEN*2+2]; + packet->length(0); + msgbuf[0] = 0; // healthy paranoia ? my_vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); msgbuf[sizeof(msgbuf) - 1] = 0; // healthy paranoia @@ -70,9 +72,12 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, my_message(ER_NOT_KEYFILE,msgbuf,MYF(MY_WME)); return; } - net_store_data(packet, param->table_name); + length=(uint) (strxmov(name, param->db_name,".",param->table_name,NullS) - + name); + net_store_data(packet, name, length); net_store_data(packet, param->op_name); net_store_data(packet, msg_type); + net_store_data(packet, msgbuf); if (my_net_write(&thd->net, (char*)thd->packet.ptr(), thd->packet.length())) fprintf(stderr, @@ -245,6 +250,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) myisamchk_init(¶m); param.thd = thd; param.op_name = (char*)"check"; + param.db_name = table->table_cache_key; param.table_name = table->table_name; param.testflag = check_opt->flags | T_CHECK | T_SILENT; @@ -332,6 +338,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) myisamchk_init(¶m); param.thd = thd; param.op_name = (char*) "analyze"; + param.db_name = table->table_cache_key; param.table_name = table->table_name; param.testflag=(T_FAST | T_CHECK | T_SILENT | T_STATISTICS | T_DONT_CHECK_CHECKSUM); @@ -384,6 +391,7 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt) myisamchk_init(¶m); param.thd = thd; param.op_name = (char*)"restore"; + param.db_name = table->table_cache_key; param.table_name = table->table_name; param.testflag = 0; mi_check_print_error(¶m,errmsg, errno ); @@ -438,6 +446,7 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt) myisamchk_init(¶m); param.thd = thd; param.op_name = (char*)"backup"; + param.db_name = table->table_cache_key; param.table_name = table->table_name; param.testflag = 0; mi_check_print_error(¶m,errmsg, errno ); @@ -524,6 +533,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) ha_rows rows= file->state->records; DBUG_ENTER("ha_myisam::repair"); + param.db_name = table->table_cache_key; param.table_name = table->table_name; param.tmpfile_createflag = O_RDWR | O_TRUNC; param.using_global_keycache = 1; |