Loading innobase/include/os0file.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ Created 10/21/1995 Heikki Tuuri #include <time.h> #endif #ifdef UNIV_DO_FLUSH extern ibool os_do_not_call_flush_at_each_write; #endif /* UNIV_DO_FLUSH */ extern ibool os_has_said_disk_full; extern ibool os_aio_print_debug; Loading innobase/os/os0file.c +14 −0 Original line number Diff line number Diff line Loading @@ -33,9 +33,13 @@ ulint os_innodb_umask = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; ulint os_innodb_umask = 0; #endif #ifdef UNIV_DO_FLUSH /* If the following is set to TRUE, we do not call os_file_flush in every os_file_write. We can set this TRUE when the doublewrite buffer is used. */ ibool os_do_not_call_flush_at_each_write = FALSE; #else /* We do not call os_file_flush in every os_file_write. */ #endif /* UNIV_DO_FLUSH */ /* We use these mutexes to protect lseek + file i/o operation, if the OS does not provide an atomic pread or pwrite, or similar */ Loading Loading @@ -1974,6 +1978,7 @@ os_file_pwrite( os_file_n_pending_pwrites--; os_mutex_exit(os_file_count_mutex); # ifdef UNIV_DO_FLUSH if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC && srv_unix_file_flush_method != SRV_UNIX_NOSYNC && !os_do_not_call_flush_at_each_write) { Loading @@ -1984,6 +1989,7 @@ os_file_pwrite( ut_a(TRUE == os_file_flush(file)); } # endif /* UNIV_DO_FLUSH */ return(ret); #else Loading @@ -2006,6 +2012,7 @@ os_file_pwrite( ret = write(file, buf, (ssize_t)n); # ifdef UNIV_DO_FLUSH if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC && srv_unix_file_flush_method != SRV_UNIX_NOSYNC && !os_do_not_call_flush_at_each_write) { Loading @@ -2016,6 +2023,7 @@ os_file_pwrite( ut_a(TRUE == os_file_flush(file)); } # endif /* UNIV_DO_FLUSH */ os_mutex_exit(os_file_seek_mutexes[i]); Loading Loading @@ -2282,9 +2290,11 @@ os_file_write( /* Always do fsync to reduce the probability that when the OS crashes, a database page is only partially physically written to disk. */ # ifdef UNIV_DO_FLUSH if (!os_do_not_call_flush_at_each_write) { ut_a(TRUE == os_file_flush(file)); } # endif /* UNIV_DO_FLUSH */ os_mutex_exit(os_file_seek_mutexes[i]); Loading Loading @@ -3498,10 +3508,12 @@ os_aio_windows_handle( if (ret && len == slot->len) { ret_val = TRUE; # ifdef UNIV_DO_FLUSH if (slot->type == OS_FILE_WRITE && !os_do_not_call_flush_at_each_write) { ut_a(TRUE == os_file_flush(slot->file)); } # endif /* UNIV_DO_FLUSH */ } else { os_file_handle_error(slot->name, "Windows aio"); Loading Loading @@ -3582,10 +3594,12 @@ os_aio_posix_handle( *message1 = slot->message1; *message2 = slot->message2; # ifdef UNIV_DO_FLUSH if (slot->type == OS_FILE_WRITE && !os_do_not_call_flush_at_each_write) { ut_a(TRUE == os_file_flush(slot->file)); } # endif /* UNIV_DO_FLUSH */ os_mutex_exit(array->mutex); Loading innobase/trx/trx0sys.c +2 −1 Original line number Diff line number Diff line Loading @@ -97,8 +97,9 @@ trx_doublewrite_init( /* Since we now start to use the doublewrite buffer, no need to call fsync() after every write to a data file */ #ifdef UNIV_DO_FLUSH os_do_not_call_flush_at_each_write = TRUE; #endif /* UNIV_DO_FLUSH */ mutex_create(&(trx_doublewrite->mutex)); mutex_set_level(&(trx_doublewrite->mutex), SYNC_DOUBLEWRITE); Loading libmysql/libmysql.def +2 −0 Original line number Diff line number Diff line Loading @@ -147,4 +147,6 @@ EXPORTS mysql_slave_query mysql_embedded mysql_set_character_set mysql_server_init mysql_server_end get_defaults_files mysql-test/r/func_gconcat.result +24 −0 Original line number Diff line number Diff line Loading @@ -445,6 +445,30 @@ group_concat(distinct b order by b) Warnings: Warning 1260 2 line(s) were cut by GROUP_CONCAT() drop table t1; create table t1 (a varchar(255) character set cp1250 collate cp1250_general_ci, b varchar(255) character set koi8r); insert into t1 values ('xxx','yyy'); select collation(a) from t1; collation(a) cp1250_general_ci select collation(group_concat(a)) from t1; collation(group_concat(a)) cp1250_general_ci create table t2 select group_concat(a) as a from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `a` longtext character set cp1250 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select collation(group_concat(a,_koi8r'test')) from t1; collation(group_concat(a,_koi8r'test')) cp1250_general_ci select collation(group_concat(a,_koi8r 0xC1C2)) from t1; ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,COERCIBLE) for operation 'group_concat' select collation(group_concat(a,b)) from t1; ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,IMPLICIT) for operation 'group_concat' drop table t1; drop table t2; CREATE TABLE t1 (id int); SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL; gc Loading Loading
innobase/include/os0file.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ Created 10/21/1995 Heikki Tuuri #include <time.h> #endif #ifdef UNIV_DO_FLUSH extern ibool os_do_not_call_flush_at_each_write; #endif /* UNIV_DO_FLUSH */ extern ibool os_has_said_disk_full; extern ibool os_aio_print_debug; Loading
innobase/os/os0file.c +14 −0 Original line number Diff line number Diff line Loading @@ -33,9 +33,13 @@ ulint os_innodb_umask = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; ulint os_innodb_umask = 0; #endif #ifdef UNIV_DO_FLUSH /* If the following is set to TRUE, we do not call os_file_flush in every os_file_write. We can set this TRUE when the doublewrite buffer is used. */ ibool os_do_not_call_flush_at_each_write = FALSE; #else /* We do not call os_file_flush in every os_file_write. */ #endif /* UNIV_DO_FLUSH */ /* We use these mutexes to protect lseek + file i/o operation, if the OS does not provide an atomic pread or pwrite, or similar */ Loading Loading @@ -1974,6 +1978,7 @@ os_file_pwrite( os_file_n_pending_pwrites--; os_mutex_exit(os_file_count_mutex); # ifdef UNIV_DO_FLUSH if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC && srv_unix_file_flush_method != SRV_UNIX_NOSYNC && !os_do_not_call_flush_at_each_write) { Loading @@ -1984,6 +1989,7 @@ os_file_pwrite( ut_a(TRUE == os_file_flush(file)); } # endif /* UNIV_DO_FLUSH */ return(ret); #else Loading @@ -2006,6 +2012,7 @@ os_file_pwrite( ret = write(file, buf, (ssize_t)n); # ifdef UNIV_DO_FLUSH if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC && srv_unix_file_flush_method != SRV_UNIX_NOSYNC && !os_do_not_call_flush_at_each_write) { Loading @@ -2016,6 +2023,7 @@ os_file_pwrite( ut_a(TRUE == os_file_flush(file)); } # endif /* UNIV_DO_FLUSH */ os_mutex_exit(os_file_seek_mutexes[i]); Loading Loading @@ -2282,9 +2290,11 @@ os_file_write( /* Always do fsync to reduce the probability that when the OS crashes, a database page is only partially physically written to disk. */ # ifdef UNIV_DO_FLUSH if (!os_do_not_call_flush_at_each_write) { ut_a(TRUE == os_file_flush(file)); } # endif /* UNIV_DO_FLUSH */ os_mutex_exit(os_file_seek_mutexes[i]); Loading Loading @@ -3498,10 +3508,12 @@ os_aio_windows_handle( if (ret && len == slot->len) { ret_val = TRUE; # ifdef UNIV_DO_FLUSH if (slot->type == OS_FILE_WRITE && !os_do_not_call_flush_at_each_write) { ut_a(TRUE == os_file_flush(slot->file)); } # endif /* UNIV_DO_FLUSH */ } else { os_file_handle_error(slot->name, "Windows aio"); Loading Loading @@ -3582,10 +3594,12 @@ os_aio_posix_handle( *message1 = slot->message1; *message2 = slot->message2; # ifdef UNIV_DO_FLUSH if (slot->type == OS_FILE_WRITE && !os_do_not_call_flush_at_each_write) { ut_a(TRUE == os_file_flush(slot->file)); } # endif /* UNIV_DO_FLUSH */ os_mutex_exit(array->mutex); Loading
innobase/trx/trx0sys.c +2 −1 Original line number Diff line number Diff line Loading @@ -97,8 +97,9 @@ trx_doublewrite_init( /* Since we now start to use the doublewrite buffer, no need to call fsync() after every write to a data file */ #ifdef UNIV_DO_FLUSH os_do_not_call_flush_at_each_write = TRUE; #endif /* UNIV_DO_FLUSH */ mutex_create(&(trx_doublewrite->mutex)); mutex_set_level(&(trx_doublewrite->mutex), SYNC_DOUBLEWRITE); Loading
libmysql/libmysql.def +2 −0 Original line number Diff line number Diff line Loading @@ -147,4 +147,6 @@ EXPORTS mysql_slave_query mysql_embedded mysql_set_character_set mysql_server_init mysql_server_end get_defaults_files
mysql-test/r/func_gconcat.result +24 −0 Original line number Diff line number Diff line Loading @@ -445,6 +445,30 @@ group_concat(distinct b order by b) Warnings: Warning 1260 2 line(s) were cut by GROUP_CONCAT() drop table t1; create table t1 (a varchar(255) character set cp1250 collate cp1250_general_ci, b varchar(255) character set koi8r); insert into t1 values ('xxx','yyy'); select collation(a) from t1; collation(a) cp1250_general_ci select collation(group_concat(a)) from t1; collation(group_concat(a)) cp1250_general_ci create table t2 select group_concat(a) as a from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `a` longtext character set cp1250 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select collation(group_concat(a,_koi8r'test')) from t1; collation(group_concat(a,_koi8r'test')) cp1250_general_ci select collation(group_concat(a,_koi8r 0xC1C2)) from t1; ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,COERCIBLE) for operation 'group_concat' select collation(group_concat(a,b)) from t1; ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,IMPLICIT) for operation 'group_concat' drop table t1; drop table t2; CREATE TABLE t1 (id int); SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL; gc Loading