summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-29 05:09:28 +0200
committerunknown <monty@donna.mysql.com>2000-11-29 05:09:28 +0200
commit2c036ff7b95fd7350d9cb207470ae0022b81e76f (patch)
treeee9a533ec9c7faa983b88519569d772d4c829bc1 /sql/sql_base.cc
parent2c660371c9a8930883bdf8d8b1b46d57b5f6265c (diff)
downloadmariadb-git-2c036ff7b95fd7350d9cb207470ae0022b81e76f.tar.gz
Fixed bug in 'drop table'
Portability fixes sql-bench/bench-init.pl.sh: Change mode to -rw-rw-r-- sql-bench/compare-results.sh: Change mode to -rw-rw-r-- sql-bench/run-all-tests.sh: Change mode to -rw-rw-r-- sql-bench/test-ATIS.sh: Change mode to -rw-rw-r-- sql-bench/test-alter-table.sh: Change mode to -rw-rw-r-- sql-bench/test-big-tables.sh: Change mode to -rw-rw-r-- sql-bench/test-connect.sh: Change mode to -rw-rw-r-- sql-bench/test-create.sh: Change mode to -rw-rw-r-- sql-bench/test-select.sh: Change mode to -rw-rw-r-- sql-bench/test-wisconsin.sh: Change mode to -rw-rw-r-- Docs/manual.texi: Added documentation for perror myisam/mi_check.c: Portability fix mysql-test/chew_on_this/select.res: ***MISSING WEAVE*** scripts/mysqlhotcopy.sh: Added --noindices sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/copy-db.sh: Changed multi_value_insert -> insert_multi_value sql-bench/crash-me.sh: Changed multi_value_insert -> insert_multi_value sql-bench/limits/Adabas.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/access.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/access_odbc.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/frontbase.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/interbase.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/mimer.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/ms-sql.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/msql.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/mysql-3.22.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/mysql-3.23.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/mysql.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/oracle.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/limits/pg.cfg: Changed multi_value_insert -> insert_multi_value sql-bench/print-limit-table: Better groups sql-bench/server-cfg.sh: Changed multi_value_insert -> insert_multi_value sql-bench/test-insert.sh: Changed multi_value_insert -> insert_multi_value sql/ha_myisam.cc: Added warning of number of rows changed in optimize sql/mysqlbinlog.cc: Portability fix sql/mysqld.cc: Changed mysqld to take less stack and safer shutdown sql/share/swedish/errmsg.OLD: update sql/sql_base.cc: Fixed 'drop table' bug sql/sql_parse.cc: Fixed bug in 'TRUNCATE' sql/sql_show.cc: Don't lock keycache when you do 'show variables'
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index f582b4a85af..75add1e7a5f 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -669,12 +669,11 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
DBUG_RETURN(0);
key_length= (uint) (strmov(strmov(key,db)+1,table_name)-key)+1;
int4store(key + key_length, thd->slave_proxy_id);
- key_length += 4;
for (table=thd->temporary_tables; table ; table=table->next)
{
- if (table->key_length == key_length &&
- !memcmp(table->table_cache_key,key,key_length))
+ if (table->key_length == key_length+4 &&
+ !memcmp(table->table_cache_key,key,key_length+4))
{
if (table->query_id == thd->query_id)
{