diff options
49 files changed, 128 insertions, 40 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 0172428a195..a3ddb0de816 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -8262,6 +8262,12 @@ following information: @example 127.0.0.1 localhost @end example + +@item @code{ALTER TABLE} +While you are doing an @code{ALTER TABLE} the table is locked from usage +by other threads. This has to do with the fact that you on Windows can't +delete a file that is in use by another threads. (We may in the future +find some way to go around this problem). @end table Here are some open issues for anyone who might want to help us with the Windows diff --git a/client/mysql.cc b/client/mysql.cc index e5246aac6c5..b7a41a122eb 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -145,14 +145,18 @@ void tee_putc(int c, FILE *file); static int get_options(int argc,char **argv); static int com_quit(String *str,char*), com_go(String *str,char*), com_ego(String *str,char*), - com_edit(String *str,char*), com_print(String *str,char*), + com_print(String *str,char*), com_help(String *str,char*), com_clear(String *str,char*), com_connect(String *str,char*), com_status(String *str,char*), com_use(String *str,char*), com_source(String *str, char*), - com_rehash(String *str, char*), com_pager(String *str, char*), - com_nopager(String *str, char*), com_tee(String *str, char*), + com_rehash(String *str, char*), com_tee(String *str, char*), com_notee(String *str, char*); +#ifndef __WIN__ +static int com_nopager(String *str, char*), com_pager(String *str, char*), + com_edit(String *str,char*); +#endif + static int read_lines(bool execute_commands); static int sql_connect(char *host,char *database,char *user,char *password, uint silent); @@ -180,7 +184,9 @@ static COMMANDS commands[] = { { "clear", 'c', com_clear, 0, "Clear command."}, { "connect",'r', com_connect,1, "Reconnect to the server. Optional arguments are db and host." }, +#ifndef __WIN__ { "edit", 'e', com_edit, 0, "Edit command with $EDITOR."}, +#endif { "ego", 'G', com_ego, 0, "Send command to mysql server, display result vertically."}, { "exit", 'q', com_quit, 0, "Exit mysql. Same as quit."}, @@ -764,6 +770,16 @@ static int read_lines(bool execute_commands) } else { +#ifdef __WIN__ + if (opt_outfile && glob_buffer.is_empty()) + fflush(OUTFILE); + tee_fputs(glob_buffer.is_empty() ? "mysql> " : + !in_string ? " -> " : + in_string == '\'' ? + " '> " : " \"> ",stdout); + linebuffer[0]=(char) sizeof(linebuffer); + line=_cgets(linebuffer); +#else if (opt_outfile) { if (glob_buffer.is_empty()) @@ -773,14 +789,6 @@ static int read_lines(bool execute_commands) in_string == '\'' ? " '> " : " \"> ", OUTFILE); } -#ifdef __WIN__ - tee_fprintf(stdout, glob_buffer.is_empty() ? "mysql> " : - !in_string ? " -> " : - in_string == '\'' ? - " '> " : " \"> "); - linebuffer[0]=(char) sizeof(linebuffer); - line=_cgets(linebuffer); -#else line=readline((char*) (glob_buffer.is_empty() ? "mysql> " : !in_string ? " -> " : in_string == '\'' ? @@ -1476,7 +1484,7 @@ static void end_pager() static void init_tee() { - if (!(OUTFILE= my_fopen(outfile,O_APPEND | O_WRONLY | O_BINARY,MYF(MY_WME)))) + if (!(OUTFILE= my_fopen(outfile, O_APPEND | O_WRONLY, MYF(MY_WME)))) { opt_outfile=0; init_pager(); @@ -1727,7 +1735,7 @@ com_tee(String *buffer, char *line __attribute__((unused))) init_tee(); opt_outfile=1; } - tee_fprintf(stdout, "Outfile '%s' is in use now.\n", outfile); + tee_fprintf(stdout, "Logging to file '%s'\n", outfile); return 0; } @@ -1742,6 +1750,11 @@ com_notee(String *buffer __attribute__((unused)), return 0; } +/* +** Sorry, this command is not available in Windows. +*/ + +#ifndef __WIN__ static int com_pager(String *buffer, char *line __attribute__((unused))) { @@ -1749,10 +1762,6 @@ com_pager(String *buffer, char *line __attribute__((unused))) if (status.batch) return 0; -#ifdef __WIN__ - tee_fprintf(stdout, "Sorry, this command is not available in Windows.\n"); - return 0; -#endif /* Skip space from file name */ while (isspace(*line)) line++; @@ -1783,28 +1792,27 @@ com_pager(String *buffer, char *line __attribute__((unused))) return 0; } + static int com_nopager(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { -#ifdef __WIN__ - tee_fprintf(stdout, "This command has no function in Windows.\n"); - return 0; -#endif strmov(pager, "stdout"); opt_nopager=1; tee_fprintf(stdout, "PAGER set to stdout\n"); return 0; } +#endif +/* +** Sorry, you can't send the result to an editor in Win32 +*/ + +#ifndef __WIN__ static int com_edit(String *buffer,char *line __attribute__((unused))) { -#ifdef __WIN__ - put_info("Sorry, you can't send the result to an editor in Win32", - INFO_ERROR); -#else char filename[FN_REFLEN],buff[160]; int fd,tmp; const char *editor; @@ -1838,9 +1846,10 @@ com_edit(String *buffer,char *line __attribute__((unused))) (void) my_close(fd,MYF(0)); (void) my_delete(filename,MYF(MY_WME)); err: -#endif return 0; } +#endif + /* If arg is given, exit without errors. This happens on command 'quit' */ diff --git a/include/myisam.h b/include/myisam.h index 0183098a385..d198d6af80e 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -353,6 +353,7 @@ typedef struct st_mi_sortinfo { /* functions in mi_check */ void myisamchk_init(MI_CHECK *param); +int chk_status(MI_CHECK *param, MI_INFO *info); int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag); int chk_size(MI_CHECK *param, MI_INFO *info); int chk_key(MI_CHECK *param, MI_INFO *info); diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 718b734ef6d..59623210473 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -194,4 +194,6 @@ #define ER_FT_MATCHING_KEY_NOT_FOUND 1191 #define ER_LOCK_OR_ACTIVE_TRANSACTION 1192 #define ER_UNKNOWN_SYSTEM_VARIABLE 1193 -#define ER_ERROR_MESSAGES 194 +#define ER_CRASHED_ON_USAGE 1194 +#define ER_CRASHED_ON_REPAIR 1195 +#define ER_ERROR_MESSAGES 196 diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 253abbbcffb..a38a45f9438 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -97,6 +97,26 @@ void myisamchk_init(MI_CHECK *param) param->start_check_pos=0; } + /* Check the status flags for the table */ + +int chk_status(MI_CHECK *param, register MI_INFO *info) +{ + MYISAM_SHARE *share=info->s; + if (mi_is_crashed_on_repair(info)) + mi_check_print_warning(param, + "Table is marked as crashed and last repair failed"); + else if (mi_is_crashed(info)) + mi_check_print_warning(param, + "Table is marked as crashed"); + if (share->state.open_count) + { + mi_check_print_warning(param, + "%d clients is using or hasn't closed the table properly", + share->state.open_count); + } + return 0; +} + /* Check delete links */ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag) diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index d045bf0018b..f2b3f337c67 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -196,7 +196,7 @@ static struct option long_options[] = static void print_version(void) { - printf("%s Ver 1.37 for %s at %s\n",my_progname,SYSTEM_TYPE, + printf("%s Ver 1.38 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); } @@ -739,12 +739,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) printf("Data records: %7s Deleted blocks: %7s\n", llstr(info->state->records,llbuff), llstr(info->state->del,llbuff2)); - if (share->state.open_count) - { - mi_check_print_warning(param, - "%d clients is using or hasn't closed the table properly", - share->state.open_count); - } + error =chk_status(param,info); share->state.key_map &=param->keys_in_use; error =chk_size(param,info); if (!error || !(param->testflag & (T_FAST | T_FORCE_CREATE))) diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 630a672d346..7f658303a4c 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -259,6 +259,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) (uint) (share->global_changed ? 1 : 0))))) return HA_ADMIN_ALREADY_DONE; + error = chk_status(¶m, file); // Not fatal error = chk_size(¶m, file); if (!error) error |= chk_del(¶m, file, param.testflag); @@ -266,8 +267,10 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) error = chk_key(¶m, file); if (!error) { - if (!check_opt->quick && - (share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))) + if ((!check_opt->quick && + (share->options & + (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))) || + mi_is_crashed(file)) { init_io_cache(¶m.read_cache, file->dfile, my_default_record_cache_size, READ_CACHE, @@ -281,7 +284,8 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) if ((share->state.changed & (STATE_CHANGED | STATE_CRASHED_ON_REPAIR | STATE_CRASHED | STATE_NOT_ANALYZED)) || - (param.testflag & T_STATISTICS)) + (param.testflag & T_STATISTICS) || + mi_is_crashed(file)) { file->update|=HA_STATE_CHANGED | HA_STATE_ROW_CHANGED; pthread_mutex_lock(&share->intern_lock); diff --git a/sql/handler.cc b/sql/handler.cc index f1ec7ea7e09..8987bed4157 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -543,9 +543,14 @@ void handler::print_error(int error, myf errflag) textno=ER_CHECKREAD; break; case HA_ERR_CRASHED: - case HA_ERR_CRASHED_ON_REPAIR: textno=ER_NOT_KEYFILE; break; + case HA_ERR_CRASHED_ON_USAGE: + textno=ER_CRASHED_ON_USAGE; + break; + case HA_ERR_CRASHED_ON_REPAIR: + textno=ER_CRASHED_ON_REPAIR; + break; case HA_ERR_OUT_OF_MEM: my_error(ER_OUT_OF_RESOURCES,errflag); DBUG_VOID_RETURN; diff --git a/sql/share/czech/errmsg.sys b/sql/share/czech/errmsg.sys Binary files differindex 2d048a6f6ba..39221d1ab69 100644 --- a/sql/share/czech/errmsg.sys +++ b/sql/share/czech/errmsg.sys diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 5991b3f36d4..2a61de73ba1 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -209,3 +209,5 @@ "-B®ádný sloupec nemá vytvoøen fulltextový index",-A "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/danish/errmsg.sys b/sql/share/danish/errmsg.sys Binary files differindex af7d44e4c2d..88d1508e210 100644 --- a/sql/share/danish/errmsg.sys +++ b/sql/share/danish/errmsg.sys diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 3881a0c525a..e42b9d0e854 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -198,3 +198,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/dutch/errmsg.sys b/sql/share/dutch/errmsg.sys Binary files differindex 068499d48fd..92a5833e2c6 100644 --- a/sql/share/dutch/errmsg.sys +++ b/sql/share/dutch/errmsg.sys diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index dd97f0a4007..8b5c6c0e23e 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -195,3 +195,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/english/errmsg.sys b/sql/share/english/errmsg.sys Binary files differindex 620236eafa6..65496eae040 100644 --- a/sql/share/english/errmsg.sys +++ b/sql/share/english/errmsg.sys diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index e1bbf40d162..67357b2c054 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -195,3 +195,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/estonian/errmsg.sys b/sql/share/estonian/errmsg.sys Binary files differindex 44320e52609..42015a12c22 100644 --- a/sql/share/estonian/errmsg.sys +++ b/sql/share/estonian/errmsg.sys diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 71ea8bc5b8b..953c435887d 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -199,3 +199,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/french/errmsg.sys b/sql/share/french/errmsg.sys Binary files differindex 33eb8bef15a..e8f430cdf3e 100644 --- a/sql/share/french/errmsg.sys +++ b/sql/share/french/errmsg.sys diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 66a717864fd..a8b5da897c6 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -195,3 +195,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/german/errmsg.sys b/sql/share/german/errmsg.sys Binary files differindex 755783a4d20..7bfaa5b5b98 100644 --- a/sql/share/german/errmsg.sys +++ b/sql/share/german/errmsg.sys diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 580eddc0cb1..19b91670b8f 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -198,3 +198,5 @@ "Kann keinen FULLTEXT-Index finden der der Spaltenliste entspricht", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/greek/errmsg.sys b/sql/share/greek/errmsg.sys Binary files differindex ee3ea496c11..b1eaca8eaf4 100644 --- a/sql/share/greek/errmsg.sys +++ b/sql/share/greek/errmsg.sys diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index f09cf02f6f8..3a1e2fb8c6f 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -195,3 +195,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/hungarian/errmsg.sys b/sql/share/hungarian/errmsg.sys Binary files differindex dbdd2e67324..6d990595420 100644 --- a/sql/share/hungarian/errmsg.sys +++ b/sql/share/hungarian/errmsg.sys diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index fd9bc62d093..f69e8ea4ce2 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -197,3 +197,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/italian/errmsg.sys b/sql/share/italian/errmsg.sys Binary files differindex c19f29b2d59..a3f51791820 100644 --- a/sql/share/italian/errmsg.sys +++ b/sql/share/italian/errmsg.sys diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index a84ea10af53..8fd4358784e 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -195,3 +195,5 @@ "Impossibile trovare un indice FULLTEXT che corrisponda all'elenco delle colonne", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/japanese/errmsg.sys b/sql/share/japanese/errmsg.sys Binary files differindex f437801bf62..78fe9fba669 100644 --- a/sql/share/japanese/errmsg.sys +++ b/sql/share/japanese/errmsg.sys diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 123c862144b..71335336cd3 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -197,3 +197,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/korean/errmsg.sys b/sql/share/korean/errmsg.sys Binary files differindex c8d10748959..da8df0b02aa 100644 --- a/sql/share/korean/errmsg.sys +++ b/sql/share/korean/errmsg.sys diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index d373294295f..f884a1b13f2 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -195,3 +195,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 5581c951ac3..8de66328a05 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -197,3 +197,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index d41b71a0ac7..e5554e0bb43 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -197,3 +197,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/polish/errmsg.sys b/sql/share/polish/errmsg.sys Binary files differindex ab4ed6adbf9..547e5a5d60d 100644 --- a/sql/share/polish/errmsg.sys +++ b/sql/share/polish/errmsg.sys diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 6fbb550ebca..4338fc49971 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -199,3 +199,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/portuguese/errmsg.sys b/sql/share/portuguese/errmsg.sys Binary files differindex 040cdea0b47..35b3ba1d3cd 100644 --- a/sql/share/portuguese/errmsg.sys +++ b/sql/share/portuguese/errmsg.sys diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 62289c3f2b9..ea9346be023 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -195,3 +195,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index bd1d0618027..7e301bc9b4d 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -199,3 +199,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/russian/errmsg.sys b/sql/share/russian/errmsg.sys Binary files differindex 7d57defb1b8..3d32c61bd35 100644 --- a/sql/share/russian/errmsg.sys +++ b/sql/share/russian/errmsg.sys diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index e70d4e343cb..79f113030e5 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -198,3 +198,5 @@ "FULLTEXT ÉÎÄÅËÓ, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÊ ÚÁÄÁÎÎÏÍÕ ÓÐÉÓËÕ ÓÔÏÌÂÃÏ×, ÎÅ ÎÁÊÄÅÎ", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/slovak/errmsg.sys b/sql/share/slovak/errmsg.sys Binary files differindex cdcd6e8d39f..d2a4c792794 100644 --- a/sql/share/slovak/errmsg.sys +++ b/sql/share/slovak/errmsg.sys diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 24176719e1f..0dbac3a4d98 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -203,3 +203,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/spanish/errmsg.sys b/sql/share/spanish/errmsg.sys Binary files differindex fd0aeb829b1..ebc069aefbd 100644 --- a/sql/share/spanish/errmsg.sys +++ b/sql/share/spanish/errmsg.sys diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index cdf40b428d9..9393238c365 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -196,3 +196,5 @@ "Can't find FULLTEXT index matching the column list", "Can't execute the given command because you have active locked tables or an active transaction", "Unknown system variable '%-.64'", +"Table '%-.64s' is marked as crashed and should be repaired", +"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", diff --git a/sql/share/swedish/errmsg.OLD b/sql/share/swedish/errmsg.OLD index bf5c48af10d..6f315fb456b 100644 --- a/sql/share/swedish/errmsg.OLD +++ b/sql/share/swedish/errmsg.OLD @@ -195,3 +195,7 @@ "Hittar inte ett FULLTEXT index i kolumnlistan", "Kan inte exekvera kommandot emedan du har en låst tabell eller an aktiv transaktion", "Okänd system variabel '%-.64'", +#ER_CRASHED_ON_USAGE +"Tabell '%-.64s' är crashad och bör repareras med REPAIR TABLE", +#ER_CRASHED_ON_REPAIR +"Tabell '%-.64s' är crashad och senast (automatiska?) reparation misslyckades", diff --git a/sql/share/swedish/errmsg.sys b/sql/share/swedish/errmsg.sys Binary files differindex aa35854cdbd..cf773e61228 100644 --- a/sql/share/swedish/errmsg.sys +++ b/sql/share/swedish/errmsg.sys diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index bf5c48af10d..eb4ded6cfb0 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -195,3 +195,5 @@ "Hittar inte ett FULLTEXT index i kolumnlistan", "Kan inte exekvera kommandot emedan du har en låst tabell eller an aktiv transaktion", "Okänd system variabel '%-.64'", +"Tabell '%-.64s' är crashad och bör repareras med REPAIR TABLE", +"Tabell '%-.64s' är crashad och senast (automatiska?) reparation misslyckades", diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 68b5d90217c..d1be84b4143 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -650,8 +650,8 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, (Item_result_field***) 0, &tmp_field,0,0); if (!field || !(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ? - ((Item_field *)item)->field : NULL) - ))) + ((Item_field *)item)->field : + (Field*) 0)))) DBUG_RETURN(0); extra_fields->push_back(cr_field); } |