summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-06-12 16:52:36 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2003-06-12 16:52:36 +0300
commit4ac20ad4a925fe9efa4f0937ddeb026cf112857f (patch)
treec4add756e3fc9920bd44b6c481e233ad82d452ac /sql/ha_myisam.cc
parent9be78a051939fad1f947b14560e016e86263cb63 (diff)
downloadmariadb-git-4ac20ad4a925fe9efa4f0937ddeb026cf112857f.tar.gz
Derived tables bug fix .......
sql/ha_myisam.cc: DISABLE KEYS warnings sql/sql_table.cc: DISABLE KEYS warnings
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index a9c3ddaef60..3f660abea80 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -701,12 +701,20 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize)
void ha_myisam::deactivate_non_unique_index(ha_rows rows)
{
MYISAM_SHARE* share = file->s;
+ bool do_warning=0;
if (share->state.key_map == ((ulonglong) 1L << share->base.keys)-1)
{
if (!(specialflag & SPECIAL_SAFE_MODE))
{
if (rows == HA_POS_ERROR)
+ {
+ uint orig_update= file->update;
+ file->update ^= HA_STATE_CHANGED;
+ uint check_update= file->update;
mi_extra(file, HA_EXTRA_NO_KEYS, 0);
+ do_warning= (file->update == check_update) && file->state->records;
+ file->update= orig_update;
+ }
else
{
/*
@@ -731,6 +739,10 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows)
}
else
enable_activate_all_index=0;
+ if (do_warning)
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_ILLEGAL_HA,
+ ER(ER_ILLEGAL_HA), table->table_name);
}