summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_myisam.cc10
-rw-r--r--sql/handler.cc7
-rw-r--r--sql/share/czech/errmsg.sysbin10317 -> 10452 bytes
-rw-r--r--sql/share/czech/errmsg.txt2
-rw-r--r--sql/share/danish/errmsg.sysbin10266 -> 10401 bytes
-rw-r--r--sql/share/danish/errmsg.txt2
-rw-r--r--sql/share/dutch/errmsg.sysbin10482 -> 10617 bytes
-rw-r--r--sql/share/dutch/errmsg.txt2
-rw-r--r--sql/share/english/errmsg.sysbin9647 -> 9782 bytes
-rw-r--r--sql/share/english/errmsg.txt2
-rw-r--r--sql/share/estonian/errmsg.sysbin9623 -> 9758 bytes
-rw-r--r--sql/share/estonian/errmsg.txt2
-rw-r--r--sql/share/french/errmsg.sysbin10088 -> 10223 bytes
-rw-r--r--sql/share/french/errmsg.txt2
-rw-r--r--sql/share/german/errmsg.sysbin11109 -> 11244 bytes
-rw-r--r--sql/share/german/errmsg.txt2
-rw-r--r--sql/share/greek/errmsg.sysbin11694 -> 11829 bytes
-rw-r--r--sql/share/greek/errmsg.txt2
-rw-r--r--sql/share/hungarian/errmsg.sysbin10603 -> 10738 bytes
-rw-r--r--sql/share/hungarian/errmsg.txt2
-rw-r--r--sql/share/italian/errmsg.sysbin11212 -> 11347 bytes
-rw-r--r--sql/share/italian/errmsg.txt2
-rw-r--r--sql/share/japanese/errmsg.sysbin10394 -> 10529 bytes
-rw-r--r--sql/share/japanese/errmsg.txt2
-rw-r--r--sql/share/korean/errmsg.sysbin10524 -> 10659 bytes
-rw-r--r--sql/share/korean/errmsg.txt2
-rw-r--r--sql/share/norwegian-ny/errmsg.txt2
-rw-r--r--sql/share/norwegian/errmsg.txt2
-rw-r--r--sql/share/polish/errmsg.sysbin10282 -> 10417 bytes
-rw-r--r--sql/share/polish/errmsg.txt2
-rw-r--r--sql/share/portuguese/errmsg.sysbin10207 -> 10342 bytes
-rw-r--r--sql/share/portuguese/errmsg.txt2
-rw-r--r--sql/share/romanian/errmsg.txt2
-rw-r--r--sql/share/russian/errmsg.sysbin10101 -> 10236 bytes
-rw-r--r--sql/share/russian/errmsg.txt2
-rw-r--r--sql/share/slovak/errmsg.sysbin9867 -> 10002 bytes
-rw-r--r--sql/share/slovak/errmsg.txt2
-rw-r--r--sql/share/spanish/errmsg.sysbin10223 -> 10358 bytes
-rw-r--r--sql/share/spanish/errmsg.txt2
-rw-r--r--sql/share/swedish/errmsg.OLD4
-rw-r--r--sql/share/swedish/errmsg.sysbin9960 -> 10103 bytes
-rw-r--r--sql/share/swedish/errmsg.txt2
-rw-r--r--sql/sql_delete.cc2
-rw-r--r--sql/sql_parse.cc5
-rw-r--r--sql/sql_select.cc6
-rw-r--r--sql/sql_table.cc4
-rw-r--r--sql/sql_update.cc2
47 files changed, 69 insertions, 13 deletions
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(&param, file); // Not fatal
error = chk_size(&param, file);
if (!error)
error |= chk_del(&param, file, param.testflag);
@@ -266,8 +267,10 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
error = chk_key(&param, 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(&param.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
index 2d048a6f6ba..39221d1ab69 100644
--- a/sql/share/czech/errmsg.sys
+++ b/sql/share/czech/errmsg.sys
Binary files differ
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
index af7d44e4c2d..88d1508e210 100644
--- a/sql/share/danish/errmsg.sys
+++ b/sql/share/danish/errmsg.sys
Binary files differ
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
index 068499d48fd..92a5833e2c6 100644
--- a/sql/share/dutch/errmsg.sys
+++ b/sql/share/dutch/errmsg.sys
Binary files differ
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
index 620236eafa6..65496eae040 100644
--- a/sql/share/english/errmsg.sys
+++ b/sql/share/english/errmsg.sys
Binary files differ
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
index 44320e52609..42015a12c22 100644
--- a/sql/share/estonian/errmsg.sys
+++ b/sql/share/estonian/errmsg.sys
Binary files differ
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
index 33eb8bef15a..e8f430cdf3e 100644
--- a/sql/share/french/errmsg.sys
+++ b/sql/share/french/errmsg.sys
Binary files differ
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
index 755783a4d20..7bfaa5b5b98 100644
--- a/sql/share/german/errmsg.sys
+++ b/sql/share/german/errmsg.sys
Binary files differ
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
index ee3ea496c11..b1eaca8eaf4 100644
--- a/sql/share/greek/errmsg.sys
+++ b/sql/share/greek/errmsg.sys
Binary files differ
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
index dbdd2e67324..6d990595420 100644
--- a/sql/share/hungarian/errmsg.sys
+++ b/sql/share/hungarian/errmsg.sys
Binary files differ
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
index c19f29b2d59..a3f51791820 100644
--- a/sql/share/italian/errmsg.sys
+++ b/sql/share/italian/errmsg.sys
Binary files differ
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
index f437801bf62..78fe9fba669 100644
--- a/sql/share/japanese/errmsg.sys
+++ b/sql/share/japanese/errmsg.sys
Binary files differ
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
index c8d10748959..da8df0b02aa 100644
--- a/sql/share/korean/errmsg.sys
+++ b/sql/share/korean/errmsg.sys
Binary files differ
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
index ab4ed6adbf9..547e5a5d60d 100644
--- a/sql/share/polish/errmsg.sys
+++ b/sql/share/polish/errmsg.sys
Binary files differ
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
index 040cdea0b47..35b3ba1d3cd 100644
--- a/sql/share/portuguese/errmsg.sys
+++ b/sql/share/portuguese/errmsg.sys
Binary files differ
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
index 7d57defb1b8..3d32c61bd35 100644
--- a/sql/share/russian/errmsg.sys
+++ b/sql/share/russian/errmsg.sys
Binary files differ
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
index cdcd6e8d39f..d2a4c792794 100644
--- a/sql/share/slovak/errmsg.sys
+++ b/sql/share/slovak/errmsg.sys
Binary files differ
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
index fd0aeb829b1..ebc069aefbd 100644
--- a/sql/share/spanish/errmsg.sys
+++ b/sql/share/spanish/errmsg.sys
Binary files differ
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
index aa35854cdbd..cf773e61228 100644
--- a/sql/share/swedish/errmsg.sys
+++ b/sql/share/swedish/errmsg.sys
Binary files differ
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_delete.cc b/sql/sql_delete.cc
index 4875be9be6c..c01ea67424f 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -175,7 +175,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit,
/* If running in safe sql mode, don't allow updates without keys */
if (!table->quick_keys)
{
- thd->options|=OPTION_NO_INDEX_USED;
+ thd->lex.options|=OPTION_NO_INDEX_USED;
if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR)
{
delete select;
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index b2e68e914eb..8e9584bc9d7 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -826,7 +826,8 @@ bool do_command(THD *thd)
if (!thd->user_time)
{
if ((ulong) (thd->start_time - thd->time_after_lock) > long_query_time ||
- ((thd->options & (OPTION_NO_INDEX_USED | OPTION_NO_GOOD_INDEX_USED)) &&
+ ((thd->lex.options &
+ (OPTION_NO_INDEX_USED | OPTION_NO_GOOD_INDEX_USED)) &&
(specialflag & SPECIAL_LONG_LOG_FORMAT)))
{
long_query_count++;
@@ -855,7 +856,7 @@ mysql_execute_command(void)
{
int res=0;
THD *thd=current_thd;
- LEX *lex=current_lex;
+ LEX *lex= &thd->lex;
TABLE_LIST *tables=(TABLE_LIST*) lex->table_list.first;
DBUG_ENTER("mysql_execute_command");
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 3aec452fe88..60f6a6299cf 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2420,7 +2420,7 @@ make_join_readinfo(JOIN *join,uint options)
/* These init changes read_record */
if (tab->use_quick == 2)
{
- join->thd->options|=OPTION_NO_GOOD_INDEX_USED;
+ join->thd->lex.options|=OPTION_NO_GOOD_INDEX_USED;
tab->read_first_record= join_init_quick_read_record;
statistic_increment(select_range_check_count, &LOCK_status);
}
@@ -2435,7 +2435,7 @@ make_join_readinfo(JOIN *join,uint options)
}
else
{
- join->thd->options|=OPTION_NO_INDEX_USED;
+ join->thd->lex.options|=OPTION_NO_INDEX_USED;
statistic_increment(select_scan_count, &LOCK_status);
}
}
@@ -2447,7 +2447,7 @@ make_join_readinfo(JOIN *join,uint options)
}
else
{
- join->thd->options|=OPTION_NO_INDEX_USED;
+ join->thd->lex.options|=OPTION_NO_INDEX_USED;
statistic_increment(select_full_join_count, &LOCK_status);
}
}
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);
}
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 41a1a9be7c2..709702142e1 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -102,7 +102,7 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields,
/* If running in safe sql mode, don't allow updates without keys */
if (!table->quick_keys)
{
- thd->options|=OPTION_NO_INDEX_USED;
+ thd->lex.options|=OPTION_NO_INDEX_USED;
if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR)
{
delete select;