summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2003-08-09 12:57:39 -0700
committerunknown <igor@rurik.mysql.com>2003-08-09 12:57:39 -0700
commitb9a90dffb6c429ab405d036734b3b04b98df69d6 (patch)
treefb4023bd9ec6f5ebab7b09b0defa7fc0df950903 /sql/ha_myisam.cc
parentcbd85f9deb0f407dcb50bd818b20e16aa77e6b2b (diff)
parentb9aa175cb282ce92e733412a74e23ba750f8dd80 (diff)
downloadmariadb-git-b9a90dffb6c429ab405d036734b3b04b98df69d6.tar.gz
Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0 sql/ha_myisam.cc: Auto merged sql/opt_range.cc: Auto merged sql/set_var.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_table.cc: Auto merged sql/table.h: Auto merged
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 85d5236a18f..dac0b118457 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -898,12 +898,20 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt)
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
{
/*
@@ -928,6 +936,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);
}