Loading innobase/os/os0file.c +4 −4 Original line number Diff line number Diff line Loading @@ -1186,7 +1186,7 @@ os_file_pread( os_file_n_pending_preads++; os_mutex_exit(os_file_count_mutex); n_bytes = pread(file, buf, n, offs); n_bytes = pread(file, buf, (ssize_t)n, offs); os_mutex_enter(os_file_count_mutex); os_file_n_pending_preads--; Loading @@ -1211,7 +1211,7 @@ os_file_pread( return(ret); } ret = read(file, buf, n); ret = read(file, buf, (ssize_t)n); os_mutex_exit(os_file_seek_mutexes[i]); Loading Loading @@ -1261,7 +1261,7 @@ os_file_pwrite( os_file_n_pending_pwrites++; os_mutex_exit(os_file_count_mutex); ret = pwrite(file, buf, n, offs); ret = pwrite(file, buf, (ssize_t)n, offs); os_mutex_enter(os_file_count_mutex); os_file_n_pending_pwrites--; Loading Loading @@ -1296,7 +1296,7 @@ os_file_pwrite( return(ret); } ret = write(file, buf, n); ret = write(file, buf, (ssize_t)n); if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC && srv_unix_file_flush_method != SRV_UNIX_NOSYNC Loading innobase/row/row0ins.c +17 −0 Original line number Diff line number Diff line Loading @@ -966,6 +966,23 @@ row_ins_foreign_check_on_constraint( err = row_update_cascade_for_mysql(thr, cascade, foreign->foreign_table); if (foreign->foreign_table->n_foreign_key_checks_running == 0) { fprintf(stderr, "InnoDB: error: table %s has the counter 0 though there is\n" "InnoDB: a FOREIGN KEY check running on it.\n", foreign->foreign_table->name); } /* Release the data dictionary latch for a while, so that we do not starve other threads from doing CREATE TABLE etc. if we have a huge cascaded operation running. The counter n_foreign_key_checks_running will prevent other users from dropping or ALTERing the table when we release the latch. */ row_mysql_unfreeze_data_dictionary(thr_get_trx(thr)); row_mysql_freeze_data_dictionary(thr_get_trx(thr)); mtr_start(mtr); /* Restore pcur position */ Loading innobase/row/row0mysql.c +2 −2 Original line number Diff line number Diff line Loading @@ -2156,7 +2156,7 @@ row_drop_table_for_mysql( fputs(" InnoDB: You are trying to drop table ", stderr); ut_print_name(stderr, table->name); fputs("\n" "InnoDB: though there are foreign key check running on it.\n" "InnoDB: though there is a foreign key check running on it.\n" "InnoDB: Adding the table to the background drop queue.\n", stderr); Loading mysql-test/r/query_cache.result +13 −0 Original line number Diff line number Diff line Loading @@ -704,4 +704,17 @@ Qcache_queries_in_cache 1 unlock table; drop table t1,t2; set query_cache_wlock_invalidate=default; CREATE TABLE t1 (id INT PRIMARY KEY); insert into t1 values (1),(2),(3); select * from t1; id 1 2 3 create temporary table t1 (a int not null auto_increment primary key); select * from t1; a drop table t1; drop table t1; set GLOBAL query_cache_size=0; mysql-test/t/query_cache.test +12 −0 Original line number Diff line number Diff line Loading @@ -521,4 +521,16 @@ unlock table; drop table t1,t2; set query_cache_wlock_invalidate=default; # # hiding real table stored in query cache by temporary table # CREATE TABLE t1 (id INT PRIMARY KEY); insert into t1 values (1),(2),(3); select * from t1; create temporary table t1 (a int not null auto_increment primary key); select * from t1; drop table t1; drop table t1; set GLOBAL query_cache_size=0; Loading
innobase/os/os0file.c +4 −4 Original line number Diff line number Diff line Loading @@ -1186,7 +1186,7 @@ os_file_pread( os_file_n_pending_preads++; os_mutex_exit(os_file_count_mutex); n_bytes = pread(file, buf, n, offs); n_bytes = pread(file, buf, (ssize_t)n, offs); os_mutex_enter(os_file_count_mutex); os_file_n_pending_preads--; Loading @@ -1211,7 +1211,7 @@ os_file_pread( return(ret); } ret = read(file, buf, n); ret = read(file, buf, (ssize_t)n); os_mutex_exit(os_file_seek_mutexes[i]); Loading Loading @@ -1261,7 +1261,7 @@ os_file_pwrite( os_file_n_pending_pwrites++; os_mutex_exit(os_file_count_mutex); ret = pwrite(file, buf, n, offs); ret = pwrite(file, buf, (ssize_t)n, offs); os_mutex_enter(os_file_count_mutex); os_file_n_pending_pwrites--; Loading Loading @@ -1296,7 +1296,7 @@ os_file_pwrite( return(ret); } ret = write(file, buf, n); ret = write(file, buf, (ssize_t)n); if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC && srv_unix_file_flush_method != SRV_UNIX_NOSYNC Loading
innobase/row/row0ins.c +17 −0 Original line number Diff line number Diff line Loading @@ -966,6 +966,23 @@ row_ins_foreign_check_on_constraint( err = row_update_cascade_for_mysql(thr, cascade, foreign->foreign_table); if (foreign->foreign_table->n_foreign_key_checks_running == 0) { fprintf(stderr, "InnoDB: error: table %s has the counter 0 though there is\n" "InnoDB: a FOREIGN KEY check running on it.\n", foreign->foreign_table->name); } /* Release the data dictionary latch for a while, so that we do not starve other threads from doing CREATE TABLE etc. if we have a huge cascaded operation running. The counter n_foreign_key_checks_running will prevent other users from dropping or ALTERing the table when we release the latch. */ row_mysql_unfreeze_data_dictionary(thr_get_trx(thr)); row_mysql_freeze_data_dictionary(thr_get_trx(thr)); mtr_start(mtr); /* Restore pcur position */ Loading
innobase/row/row0mysql.c +2 −2 Original line number Diff line number Diff line Loading @@ -2156,7 +2156,7 @@ row_drop_table_for_mysql( fputs(" InnoDB: You are trying to drop table ", stderr); ut_print_name(stderr, table->name); fputs("\n" "InnoDB: though there are foreign key check running on it.\n" "InnoDB: though there is a foreign key check running on it.\n" "InnoDB: Adding the table to the background drop queue.\n", stderr); Loading
mysql-test/r/query_cache.result +13 −0 Original line number Diff line number Diff line Loading @@ -704,4 +704,17 @@ Qcache_queries_in_cache 1 unlock table; drop table t1,t2; set query_cache_wlock_invalidate=default; CREATE TABLE t1 (id INT PRIMARY KEY); insert into t1 values (1),(2),(3); select * from t1; id 1 2 3 create temporary table t1 (a int not null auto_increment primary key); select * from t1; a drop table t1; drop table t1; set GLOBAL query_cache_size=0;
mysql-test/t/query_cache.test +12 −0 Original line number Diff line number Diff line Loading @@ -521,4 +521,16 @@ unlock table; drop table t1,t2; set query_cache_wlock_invalidate=default; # # hiding real table stored in query cache by temporary table # CREATE TABLE t1 (id INT PRIMARY KEY); insert into t1 values (1),(2),(3); select * from t1; create temporary table t1 (a int not null auto_increment primary key); select * from t1; drop table t1; drop table t1; set GLOBAL query_cache_size=0;