From e7332e64ca5ef7208846488935a2249285212f91 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Mar 2005 19:17:45 -0800 Subject: Fix crash in embedded server due to incorrect storage of results in the query cache. (Bug #9549) libmysqld/emb_qcache.h: Fix Querycache_stream::use_next_block() to actually use the next block and mark blocks as used when it writes to them. mysql-test/r/query_cache.result: Update results. mysql-test/t/query_cache.test: Add new regression test. libmysqld/emb_qcache.cc: Fix calls to use_next_block() to indicate whether we are writing to the next block or not. sql/sql_cache.cc: Initialize the first block properly when storing a result in the embedded server. --- sql/sql_cache.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sql') diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 6eff958257b..8deb3489782 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1933,6 +1933,11 @@ my_bool Query_cache::write_result_data(Query_cache_block **result_block, type = Query_cache_block::RES_CONT; } while (block != *result_block); #else + /* + Set type of first block, emb_store_querycache_result() will handle + the others. + */ + (*result_block)->type= type; Querycache_stream qs(*result_block, headers_len); emb_store_querycache_result(&qs, (THD*)data); #endif /*!EMBEDDED_LIBRARY*/ -- cgit v1.2.1 From 8c0f1e89c0c68b07c9e065c7e3ae409f5d963243 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Apr 2005 17:05:15 -0700 Subject: Clean up error message for connections-per-hour user limit being exceeded. (Bug #9947) sql/sql_parse.cc: Fix error message when connections per hour has been exceeded --- sql/sql_parse.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 49110e02113..c5b429ec8fc 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -449,7 +449,7 @@ static int check_for_max_user_connections(THD *thd, USER_CONN *uc) uc->user_resources.connections <= uc->conn_per_hour) { net_printf(thd, ER_USER_LIMIT_REACHED, uc->user, - "max_connections", + "max_connections_per_hour", (long) uc->user_resources.connections); error=1; goto end; -- cgit v1.2.1 From ef3e9e1cffd0ee79e7ad433ad83353413a59accd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Apr 2005 15:30:42 -0700 Subject: Fix 'CREATE TABLE ... LIKE ...' when lower_case_table_names is set on case-sensitive file systems and the source table was specified in something other than lowercase. (Bug #9761) mysql-test/r/lowercase_table.result: Add results mysql-test/t/lowercase_table.test: Regression test for Bug #9761 sql/sql_table.cc: When lower_case_table_names is set, make sure to look for the source table using a lowercase filename. --- sql/sql_table.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f3f8511026b..c03edfdb012 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2281,6 +2281,8 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table, reg_ext, NullS); /* Resolve symlinks (for windows) */ fn_format(src_path, src_path, "", "", MYF(MY_UNPACK_FILENAME)); + if (lower_case_table_names) + my_casedn_str(files_charset_info, src_path); if (access(src_path, F_OK)) { my_error(ER_BAD_TABLE_ERROR, MYF(0), src_table); -- cgit v1.2.1