From c4c76c5fdb4fc2e677ee6f7b885074808910cd83 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 13 May 2005 21:43:26 +0200 Subject: [PATCH] sql/ha_blackhole.cc bug#10175 - blackhole.test hangs with "Warning: prev link 1 didn't point at previous lock at read: read lock with no write locks" sql/sql_base.cc libmysqld/examples/mysql.cc linking problem --- sql/ha_blackhole.cc | 3 ++- sql/sql_base.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index 7c6e7cb56b6..c9c94b3a9d7 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -129,8 +129,9 @@ THR_LOCK_DATA **ha_blackhole::store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) { + if (lock_type != TL_IGNORE && lock.type == TL_UNLOCK) + lock.type=lock_type; *to++= &lock; - return to; } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index c580842ce06..e86362c857b 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2522,7 +2522,7 @@ bool get_key_map_from_key_list(key_map *map, TABLE *table, if ((pos= find_type(&table->keynames, name->ptr(), name->length(), 1)) <= 0) { - my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), name->c_ptr(), + my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), name->c_ptr_safe(), table->real_name); map->set_all(); return 1;