mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1 VC++Files/libmysqld/libmysqld.dsp: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/heap_btree.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/r/ndb_blob.result: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/mysql_client_test.test: Auto merged mysql-test/t/mysqltest.test: Auto merged sql/ha_myisam.cc: Auto merged sql/item_func.h: Auto merged sql/sp.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged storage/heap/hp_delete.c: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/myisamlog.c: Auto merged storage/ndb/include/kernel/signaldata/TcKeyReq.hpp: Auto merged storage/ndb/include/ndbapi/NdbBlob.hpp: Auto merged storage/ndb/test/ndbapi/testBlobs.cpp: Auto merged storage/ndb/tools/delete_all.cpp: Auto merged VC++Files/libmysqld/libmysqld.vcproj: Use original file (my_user.c was already added in 5.1) mysql-test/mysql-test-run.pl: Manual merge sql/handler.h: Manual merge sql/share/errmsg.txt: Align error messages with 5.0 sql/sql_table.cc: Manual merge storage/ndb/src/ndbapi/NdbBlob.cpp: No changes
This commit is contained in:
@@ -2563,6 +2563,12 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
|
||||
/* TODO: Add proper checks if handler supports key_type and algorithm */
|
||||
if (key_info->flags & HA_SPATIAL)
|
||||
{
|
||||
if (!(file->table_flags() & HA_CAN_RTREEKEYS))
|
||||
{
|
||||
my_message(ER_TABLE_CANT_HANDLE_SPKEYS, ER(ER_TABLE_CANT_HANDLE_SPKEYS),
|
||||
MYF(0));
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
if (key_info->key_parts != 1)
|
||||
{
|
||||
my_error(ER_WRONG_ARGUMENTS, MYF(0), "SPATIAL INDEX");
|
||||
@@ -3572,7 +3578,9 @@ mysql_rename_table(handlerton *base,
|
||||
}
|
||||
}
|
||||
delete file;
|
||||
if (error)
|
||||
if (error == HA_ERR_WRONG_COMMAND)
|
||||
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "ALTER TABLE");
|
||||
else if (error)
|
||||
my_error(ER_ERROR_ON_RENAME, MYF(0), from, to, error);
|
||||
DBUG_RETURN(error != 0);
|
||||
}
|
||||
@@ -4217,11 +4225,16 @@ send_result_message:
|
||||
table->table->s->version=0; // Force close of table
|
||||
else if (open_for_modify && !table->table->s->log_table)
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
remove_table_from_cache(thd, table->table->s->db.str,
|
||||
table->table->s->table_name.str, RTFC_NO_FLAG);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
/* Something may be modified, that's why we have to invalidate cache */
|
||||
if (table->table->s->tmp_table)
|
||||
table->table->file->info(HA_STATUS_CONST);
|
||||
else
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
remove_table_from_cache(thd, table->table->s->db.str,
|
||||
table->table->s->table_name.str, RTFC_NO_FLAG);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
}
|
||||
/* May be something modified consequently we have to invalidate cache */
|
||||
query_cache_invalidate3(thd, table->table, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user