diff options
-rw-r--r-- | .bzrignore | 5 | ||||
-rw-r--r-- | libmysql/libmysql.c | 15 | ||||
-rw-r--r-- | mysql-test/include/mix1.inc | 15 | ||||
-rw-r--r-- | mysql-test/r/innodb_mysql.result | 8 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 2 |
5 files changed, 41 insertions, 4 deletions
diff --git a/.bzrignore b/.bzrignore index bc7a7a6429d..329c5e227ca 100644 --- a/.bzrignore +++ b/.bzrignore @@ -38,9 +38,9 @@ */.libs/* */.pure */debug/* +*/minsizerel/* */release/* */relwithdebinfo/* -*/minsizerel/* *~ .*.swp ./CMakeCache.txt @@ -584,6 +584,7 @@ heap/hp_test2 help help.c help.h +include/abi_check include/check_abi include/link_sources include/my_config.h @@ -1021,8 +1022,8 @@ libmysqld/.deps/unireg.Po libmysqld/backup_dir libmysqld/client.c libmysqld/client_settings.h -libmysqld/convert.cc libmysqld/cmake_dummy.c +libmysqld/convert.cc libmysqld/derror.cc libmysqld/discover.cc libmysqld/emb_qcache.cpp diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index f994397b8fd..a05d061204b 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -168,8 +168,23 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)), } +/* + Free all memory and resources used by the client library + + NOTES + When calling this there should not be any other threads using + the library. + + To make things simpler when used with windows dll's (which calls this + function automaticly), it's safe to call this function multiple times. +*/ + + void STDCALL mysql_server_end() { + if (!mysql_client_init) + return; + #ifdef EMBEDDED_LIBRARY end_embedded_server(); #endif diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 2aca2ba3698..aa8720fe2f8 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -672,6 +672,20 @@ SELECT * FROM t3 WHERE a = 'uk'; DROP TABLE t1,t2,t3; +# +# Test bug when trying to drop data file which no InnoDB directory entry +# + +create table t1 (a int) engine=innodb; +copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t2.frm; +--error 1146 +select * from t2; +drop table t1; +--error 1051 +drop table t2; +create table t2 (a int); +drop table t2; + # # Bug #29154: LOCK TABLES is not atomic when >1 InnoDB tables are locked @@ -706,7 +720,6 @@ DISCONNECT c1; DISCONNECT c2; DROP TABLE t1,t2; - --echo End of 5.0 tests # diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index fb8139e2ce1..a88d199838b 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -665,6 +665,14 @@ UPDATE t3 SET a = 'us' WHERE a = 'uk'; SELECT * FROM t3 WHERE a = 'uk'; a DROP TABLE t1,t2,t3; +create table t1 (a int) engine=innodb; +select * from t2; +ERROR 42S02: Table 'test.t2' doesn't exist +drop table t1; +drop table t2; +ERROR 42S02: Unknown table 't2' +create table t2 (a int); +drop table t2; CREATE TABLE t1 (a INT) ENGINE=InnoDB; CREATE TABLE t2 (a INT) ENGINE=InnoDB; switch to connection c1 diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 65c3086a086..0f249b9e9bc 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -623,7 +623,7 @@ convert_error_code_to_mysql( } else if (error == (int) DB_TABLE_NOT_FOUND) { - return(HA_ERR_KEY_NOT_FOUND); + return(HA_ERR_NO_SUCH_TABLE); } else if (error == (int) DB_TOO_BIG_RECORD) { |