Loading Makefile.am +28 −12 Original line number Diff line number Diff line Loading @@ -109,7 +109,11 @@ dist-hook: tags: support-files/build-tags .PHONY: init-db bin-dist .PHONY: init-db bin-dist \ test test-force test-full test-force-full test-force-mem \ test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \ test-ps test-ns # Target 'test' will run the regression test suite using the built server. # Loading @@ -119,21 +123,33 @@ tags: # will then calculate the various port numbers it needs from this, # making sure each user use different ports. test: test-ps: cd mysql-test ; \ ./mysql-test-run && \ ./mysql-test-run --ps-protocol @PERL@ ./mysql-test-run.pl $(force) --ps-protocol test-force: test-ns: cd mysql-test ; \ ./mysql-test-run --force && \ ./mysql-test-run --ps-protocol --force @PERL@ ./mysql-test-run.pl $(force) test-force-mem: cd mysql-test; \ ./mysql-test-run --force --mem && \ ./mysql-test-run --ps-protocol --force --mem test: test-ns test-ps #used by autopush.pl to run memory based tests # To ease script-writing, although in 5.0 it is identical to 'test' test-full: test test-force: $(MAKE) force=--force test test-force-full: $(MAKE) force=--force test-full #used by autopush.pl to run memory based tests test-force-mem: $(MAKE) 'force=--force --mem' test # Keep these for a while test-pl: test test-full-pl: test-full test-force-pl: test-force test-force-pl-mem: test-force-mem test-force-full-pl: test-force-full client/mysqlbinlog.cc +19 −0 Original line number Diff line number Diff line Loading @@ -1310,6 +1310,25 @@ static int dump_local_log_entries(const char* logname) } else // reading from stdin; { /* Bug fix: #23735 Author: Chuck Bell Description: Windows opens stdin in text mode by default. Certain characters such as CTRL-Z are interpeted as events and the read() method will stop. CTRL-Z is the EOF marker in Windows. to get past this you have to open stdin in binary mode. Setmode() is used to set stdin in binary mode. Errors on setting this mode result in halting the function and printing an error message to stderr. */ #if defined (__WIN__) || (_WIN64) if (_setmode(fileno(stdin), O_BINARY) == -1) { fprintf(stderr, "Could not set binary mode on stdin.\n"); return 1; } #endif if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0, 0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE))) return 1; Loading client/mysqltest.c +18 −7 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ static my_bool disable_query_log= 0, disable_result_log= 0; static my_bool disable_warnings= 0, disable_ps_warnings= 0; static my_bool disable_info= 1; static my_bool abort_on_error= 1; static my_bool server_initialized= 0; static char **default_argv; static const char *load_default_groups[]= { "mysqltest", "client", 0 }; Loading Loading @@ -770,13 +771,18 @@ void free_used_memory() free_all_replace(); my_free(pass,MYF(MY_ALLOW_ZERO_PTR)); free_defaults(default_argv); mysql_server_end(); free_re(); #ifdef __WIN__ free_tmp_sh_file(); free_win_path_patterns(); #endif DBUG_VOID_RETURN; /* Only call mysql_server_end if mysql_server_init has been called */ if (server_initialized) mysql_server_end(); /* Don't use DBUG after mysql_server_end() */ return; } Loading Loading @@ -1240,7 +1246,9 @@ void var_set(const char *var_name, const char *var_name_end, v->int_dirty= 0; v->str_val_len= strlen(v->str_val); } strxmov(buf, v->name, "=", v->str_val, NullS); my_snprintf(buf, sizeof(buf), "%.*s=%.*s", v->name_len, v->name, v->str_val_len, v->str_val); if (!(v->env_s= my_strdup(buf, MYF(MY_WME)))) die("Out of memory"); putenv(v->env_s); Loading Loading @@ -4679,10 +4687,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, } /* Store the result. If res is NULL, use mysql_field_count to determine if that was expected Store the result of the query if it will return any fields */ if (!(res= mysql_store_result(mysql)) && mysql_field_count(mysql)) if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0)) { handle_error(command, mysql_errno(mysql), mysql_error(mysql), mysql_sqlstate(mysql), ds); Loading Loading @@ -4734,7 +4741,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, } if (res) { mysql_free_result(res); res= 0; } counter++; } while (!(err= mysql_next_result(mysql))); if (err > 0) Loading Loading @@ -5621,6 +5631,7 @@ int main(int argc, char **argv) embedded_server_args, (char**) embedded_server_groups)) die("Can't initialize MySQL server"); server_initialized= 1; if (cur_file == file_stack && cur_file->file == 0) { cur_file->file= stdin; Loading include/mysql.h +1 −1 Original line number Diff line number Diff line Loading @@ -65,9 +65,9 @@ typedef int my_socket; #endif /* my_socket_defined */ #endif /* _global_h */ #include "mysql_version.h" #include "mysql_com.h" #include "mysql_time.h" #include "mysql_version.h" #include "typelib.h" #include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ Loading include/mysql_h.ic +1 −0 Original line number Diff line number Diff line Loading @@ -575,6 +575,7 @@ enum mysql_enum_shutdown_level SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)), SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1), SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1), KILL_QUERY = 254, KILL_CONNECTION = 255, }; # 154 "mysql.h" Loading Loading
Makefile.am +28 −12 Original line number Diff line number Diff line Loading @@ -109,7 +109,11 @@ dist-hook: tags: support-files/build-tags .PHONY: init-db bin-dist .PHONY: init-db bin-dist \ test test-force test-full test-force-full test-force-mem \ test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \ test-ps test-ns # Target 'test' will run the regression test suite using the built server. # Loading @@ -119,21 +123,33 @@ tags: # will then calculate the various port numbers it needs from this, # making sure each user use different ports. test: test-ps: cd mysql-test ; \ ./mysql-test-run && \ ./mysql-test-run --ps-protocol @PERL@ ./mysql-test-run.pl $(force) --ps-protocol test-force: test-ns: cd mysql-test ; \ ./mysql-test-run --force && \ ./mysql-test-run --ps-protocol --force @PERL@ ./mysql-test-run.pl $(force) test-force-mem: cd mysql-test; \ ./mysql-test-run --force --mem && \ ./mysql-test-run --ps-protocol --force --mem test: test-ns test-ps #used by autopush.pl to run memory based tests # To ease script-writing, although in 5.0 it is identical to 'test' test-full: test test-force: $(MAKE) force=--force test test-force-full: $(MAKE) force=--force test-full #used by autopush.pl to run memory based tests test-force-mem: $(MAKE) 'force=--force --mem' test # Keep these for a while test-pl: test test-full-pl: test-full test-force-pl: test-force test-force-pl-mem: test-force-mem test-force-full-pl: test-force-full
client/mysqlbinlog.cc +19 −0 Original line number Diff line number Diff line Loading @@ -1310,6 +1310,25 @@ static int dump_local_log_entries(const char* logname) } else // reading from stdin; { /* Bug fix: #23735 Author: Chuck Bell Description: Windows opens stdin in text mode by default. Certain characters such as CTRL-Z are interpeted as events and the read() method will stop. CTRL-Z is the EOF marker in Windows. to get past this you have to open stdin in binary mode. Setmode() is used to set stdin in binary mode. Errors on setting this mode result in halting the function and printing an error message to stderr. */ #if defined (__WIN__) || (_WIN64) if (_setmode(fileno(stdin), O_BINARY) == -1) { fprintf(stderr, "Could not set binary mode on stdin.\n"); return 1; } #endif if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0, 0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE))) return 1; Loading
client/mysqltest.c +18 −7 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ static my_bool disable_query_log= 0, disable_result_log= 0; static my_bool disable_warnings= 0, disable_ps_warnings= 0; static my_bool disable_info= 1; static my_bool abort_on_error= 1; static my_bool server_initialized= 0; static char **default_argv; static const char *load_default_groups[]= { "mysqltest", "client", 0 }; Loading Loading @@ -770,13 +771,18 @@ void free_used_memory() free_all_replace(); my_free(pass,MYF(MY_ALLOW_ZERO_PTR)); free_defaults(default_argv); mysql_server_end(); free_re(); #ifdef __WIN__ free_tmp_sh_file(); free_win_path_patterns(); #endif DBUG_VOID_RETURN; /* Only call mysql_server_end if mysql_server_init has been called */ if (server_initialized) mysql_server_end(); /* Don't use DBUG after mysql_server_end() */ return; } Loading Loading @@ -1240,7 +1246,9 @@ void var_set(const char *var_name, const char *var_name_end, v->int_dirty= 0; v->str_val_len= strlen(v->str_val); } strxmov(buf, v->name, "=", v->str_val, NullS); my_snprintf(buf, sizeof(buf), "%.*s=%.*s", v->name_len, v->name, v->str_val_len, v->str_val); if (!(v->env_s= my_strdup(buf, MYF(MY_WME)))) die("Out of memory"); putenv(v->env_s); Loading Loading @@ -4679,10 +4687,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, } /* Store the result. If res is NULL, use mysql_field_count to determine if that was expected Store the result of the query if it will return any fields */ if (!(res= mysql_store_result(mysql)) && mysql_field_count(mysql)) if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0)) { handle_error(command, mysql_errno(mysql), mysql_error(mysql), mysql_sqlstate(mysql), ds); Loading Loading @@ -4734,7 +4741,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, } if (res) { mysql_free_result(res); res= 0; } counter++; } while (!(err= mysql_next_result(mysql))); if (err > 0) Loading Loading @@ -5621,6 +5631,7 @@ int main(int argc, char **argv) embedded_server_args, (char**) embedded_server_groups)) die("Can't initialize MySQL server"); server_initialized= 1; if (cur_file == file_stack && cur_file->file == 0) { cur_file->file= stdin; Loading
include/mysql.h +1 −1 Original line number Diff line number Diff line Loading @@ -65,9 +65,9 @@ typedef int my_socket; #endif /* my_socket_defined */ #endif /* _global_h */ #include "mysql_version.h" #include "mysql_com.h" #include "mysql_time.h" #include "mysql_version.h" #include "typelib.h" #include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ Loading
include/mysql_h.ic +1 −0 Original line number Diff line number Diff line Loading @@ -575,6 +575,7 @@ enum mysql_enum_shutdown_level SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)), SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1), SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1), KILL_QUERY = 254, KILL_CONNECTION = 255, }; # 154 "mysql.h" Loading