From 7c999bb03223114a4d07f23db2842363d32d1859 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 2 Dec 2001 14:34:01 +0200 Subject: Query cache. Remove some warnings Docs/manual.texi: Solaris and gcc include/ft_global.h: Remove warnings include/myisam.h: Query cache include/myisammrg.h: Query cache include/mysql_com.h: Query cache libmysqld/lib_sql.cc: Query cache myisam/ft_boolean_search.c: Remove warnings myisam/ft_dump.c: Remove warnings myisam/ft_parser.c: Remove warnings myisam/ft_static.c: Remove warnings myisam/ft_update.c: Remove warnings myisam/ftdefs.h: Remove warnings myisam/mi_delete.c: Query cache myisam/mi_locking.c: Query cache myisam/mi_update.c: Query cache myisam/myisamdef.h: Optimize for Ia64 myisammrg/myrg_extra.c: Query cache mysys/mf_keycache.c: DBUG statements regex/cclass.h: Remove warnings regex/cname.h: Remove warnings regex/main.c: Remove warnings regex/regcomp.c: Remove warnings regex/regcomp.ih: Remove warnings regex/regerror.c: Remove warnings regex/reginit.c: Remove warnings regex/split.c: Remove warnings sql-bench/test-connect.sh: Make tests query-cache safe. sql-bench/test-transactions.sh: Fix for old perl versions sql/convert.cc: Query cache sql/ha_myisammrg.cc: Query cache sql/ha_myisammrg.h: Query cache sql/handler.cc: Query cache sql/item_create.cc: Query cache sql/item_func.cc: Remove warnings sql/item_func.h: Remove warnings sql/lex.h: Query cache sql/mysql_priv.h: Query cache sql/mysqld.cc: Query cache sql/net_serv.cc: Query cache sql/sql_cache.cc: Query cache sql/sql_class.cc: Query cache sql/sql_class.h: Query cache sql/sql_db.cc: Query cache sql/sql_delete.cc: Query cache sql/sql_insert.cc: Query cache sql/sql_parse.cc: Query cache sql/sql_select.cc: Query cache sql/sql_table.cc: Query cache sql/sql_update.cc: Query cache sql/sql_yacc.yy: Query cache --- sql/sql_table.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 049fb1c182c..ae450680fbb 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -158,13 +158,17 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, wrong_tables.append(String(table->real_name)); } } - if (some_tables_deleted && !dont_log_query) + if (some_tables_deleted) { - mysql_update_log.write(thd, thd->query,thd->query_length); - if (mysql_bin_log.is_open()) + query_cache.invalidate(tables); + if (!dont_log_query) { - Query_log_event qinfo(thd, thd->query); - mysql_bin_log.write(&qinfo); + mysql_update_log.write(thd, thd->query,thd->query_length); + if (mysql_bin_log.is_open()) + { + Query_log_event qinfo(thd, thd->query); + mysql_bin_log.write(&qinfo); + } } } @@ -1708,6 +1712,8 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, } VOID(pthread_cond_broadcast(&COND_refresh)); VOID(pthread_mutex_unlock(&LOCK_open)); + table_list->table=0; // Table is closed + query_cache.invalidate(table_list); end_temporary: sprintf(tmp_name,ER(ER_INSERT_INFO),(ulong) (copied+deleted), -- cgit v1.2.1 From eca2a1a3dcd0b64b3fdfefe78f981d654396451c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Dec 2001 13:03:00 +0200 Subject: Update of query cache code. Changed some sql_alloc() -> thd->alloc() Removed a lot of compiler warnings on Linux Alpha (64 bit) Fixed some core dumps on 64 bit systems (wrong type for packet_len) Docs/manual.texi: Added base information about the query cache. include/hash.h: Export hash_replace include/myisam.h: Update of query cache code libmysql/net.c: Add casts to make things safe on 64 bit systems. myisam/mi_write.c: Update of query cache code myisammrg/myrg_extra.c: Update of query cache code mysys/hash.c: Added safety check to hash_replace sql/field.cc: Removed compiler warnings. sql/field.h: Removed compiler warnings sql/ha_myisam.cc: Fixed wrong type of packet_len sql/item.h: Remove warnings sql/log_event.cc: Cleanup sql/log_event.h: Cleanup to make code more readable sql/mf_iocache.cc: Fixed wrong type sql/mysql_priv.h: Update of query cache code sql/mysqld.cc: Update of query cache code sql/net_serv.cc: Remove compiler warnings sql/opt_range.h: Remove compiler warnings sql/sql_cache.cc: Update of query cache code sql/sql_cache.h: Update of query cache code sql/sql_class.h: Cleanup sql/sql_insert.cc: Use thd->alloc() instead of sql_alloc() sql/sql_parse.cc: Fixed compiler warnings. Changed some sql_alloc() -> thd->alloc() sql/sql_select.cc: Changed sql_alloc() -> thd_alloc() sql/sql_select.h: Faster alloc() sql/sql_show.cc: Update of query cache code sql/sql_table.cc: Faster alloc() sql/table.cc: Faster alloc() --- sql/sql_table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index ae450680fbb..737c8fccd9d 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -704,7 +704,7 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, DBUG_RETURN(0); } - Field *field=create_tmp_field(&tmp_table,item,item->type(), + Field *field=create_tmp_field(thd, &tmp_table, item, item->type(), (Item_result_field***) 0, &tmp_field,0,0); if (!field || !(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ? -- cgit v1.2.1