few small bug fixes ...

parent 75c70839
...@@ -90,7 +90,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, ...@@ -90,7 +90,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
if (!table->quick_keys) if (!table->quick_keys)
{ {
thd->lex.select_lex.options|=QUERY_NO_INDEX_USED; thd->lex.select_lex.options|=QUERY_NO_INDEX_USED;
if (safe_update && use_limit) if (safe_update && !using_limit)
{ {
delete select; delete select;
send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE);
......
...@@ -523,19 +523,19 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, ...@@ -523,19 +523,19 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
key_iterator.rewind(); key_iterator.rewind();
key_number=0; key_number=0;
for (; (key=key_iterator++) ; key_info++, key_number++) for (; (key=key_iterator++) ; key_number++)
{ {
uint key_length=0; uint key_length=0;
key_part_spec *column; key_part_spec *column;
switch(key->type){ switch(key->type){
case Key::MULTIPLE: case Key::MULTIPLE:
key_info->flags = 0; key_info->flags = 0;
break; break;
case Key::FULLTEXT: case Key::FULLTEXT:
key_info->flags = HA_FULLTEXT; key_info->flags = HA_FULLTEXT;
break; break;
case Key::SPATIAL: case Key::SPATIAL:
key_info->flags = HA_SPATIAL; key_info->flags = HA_SPATIAL;
break; break;
case Key::FOREIGN_KEY: case Key::FOREIGN_KEY:
...@@ -734,6 +734,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, ...@@ -734,6 +734,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
my_error(ER_TOO_LONG_KEY,MYF(0),max_key_length); my_error(ER_TOO_LONG_KEY,MYF(0),max_key_length);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
key_info++;
} }
if (!unique_key && !primary_key && if (!unique_key && !primary_key &&
(file->table_flags() & HA_REQUIRE_PRIMARY_KEY)) (file->table_flags() & HA_REQUIRE_PRIMARY_KEY))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment