Loading include/my_sys.h +1 −0 Original line number Diff line number Diff line Loading @@ -850,6 +850,7 @@ my_bool my_gethwaddr(uchar *to); #define PROT_WRITE 2 #define MAP_NORESERVE 0 #define MAP_SHARED 0x0001 #define MAP_PRIVATE 0x0002 #define MAP_NOSYNC 0x0800 #define MAP_FAILED ((void *)-1) #define MS_SYNC 0x0000 Loading libmysql/libmysql.c +0 −29 Original line number Diff line number Diff line Loading @@ -1380,35 +1380,6 @@ mysql_get_server_info(MYSQL *mysql) } /* Get version number for server in a form easy to test on SYNOPSIS mysql_get_server_version() mysql Connection EXAMPLE 4.1.0-alfa -> 40100 NOTES We will ensure that a newer server always has a bigger number. RETURN Signed number > 323000 */ ulong STDCALL mysql_get_server_version(MYSQL *mysql) { uint major, minor, version; char *pos= mysql->server_version, *end_pos; major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; version= (uint) strtoul(pos, &end_pos, 10); return (ulong) major*10000L+(ulong) (minor*100+version); } const char * STDCALL mysql_get_host_info(MYSQL *mysql) { Loading mysql-test/mysql-test-run.pl +53 −2 Original line number Diff line number Diff line Loading @@ -230,6 +230,8 @@ our $opt_client_ddd; our $opt_manual_gdb; our $opt_manual_ddd; our $opt_manual_debug; our $opt_debugger; our $opt_client_debugger; our $opt_gprof; our $opt_gprof_dir; Loading Loading @@ -633,6 +635,8 @@ sub command_line_setup () { 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, 'client-ddd' => \$opt_client_ddd, 'debugger=s' => \$opt_debugger, 'client-debugger=s' => \$opt_client_debugger, 'strace-client' => \$opt_strace_client, 'master-binary=s' => \$exe_master_mysqld, 'slave-binary=s' => \$exe_slave_mysqld, Loading Loading @@ -812,7 +816,8 @@ sub command_line_setup () { # Check debug related options if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug) $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_client_debugger ) { # Indicate that we are using debugger $glob_debugger= 1; Loading Loading @@ -2798,6 +2803,10 @@ sub mysqld_start ($$$$$) { { ddd_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_debugger ) { debugger_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_manual_debug ) { print "\nStart $type in your debugger\n" . Loading Loading @@ -3324,6 +3333,10 @@ sub run_mysqltest ($) { { ddd_arguments(\$args, \$exe, "client"); } elsif ( $opt_client_debugger ) { debugger_arguments(\$args, \$exe, "client"); } if ($glob_use_libtool and $opt_valgrind) { Loading Loading @@ -3476,6 +3489,42 @@ sub ddd_arguments { mtr_add_arg($$args, "$save_exe"); } # # Modify the exe and args so that program is run in the selected debugger # sub debugger_arguments { my $args= shift; my $exe= shift; my $debugger= $opt_debugger || $opt_client_debugger; if ( $debugger eq "vcexpress" or $debugger eq "vc") { # vc[express] /debugexe exe arg1 .. argn # Add /debugexe and name of the exe before args unshift(@$$args, "/debugexe"); unshift(@$$args, "$$exe"); } elsif ( $debugger eq "windbg" ) { # windbg exe arg1 .. argn # Add name of the exe before args unshift(@$$args, "$$exe"); } else { mtr_error("Unknown argument \"$debugger\" passed to --debugger"); } # Set exe to debuggername $$exe= $debugger; } # # Modify the exe and args so that program is run in valgrind # Loading Loading @@ -3588,6 +3637,8 @@ Options for debugging the product client-gdb Start mysqltest client in gdb ddd Start mysqld in ddd client-ddd Start mysqltest client in ddd debugger=NAME Start mysqld in the selected debugger client-debugger=NAME Start mysqltest in the selected debugger strace-client FIXME master-binary=PATH Specify the master "mysqld" to use slave-binary=PATH Specify the slave "mysqld" to use Loading mysql-test/r/ctype_latin1.result +22 −0 Original line number Diff line number Diff line Loading @@ -369,3 +369,25 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT 'a' as str; str a set @str= _latin1 'ABC ߲~ @ abc'; SELECT convert(@str collate latin1_bin using utf8); convert(@str collate latin1_bin using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_general_ci using utf8); convert(@str collate latin1_general_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_german1_ci using utf8); convert(@str collate latin1_german1_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_danish_ci using utf8); convert(@str collate latin1_danish_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_spanish_ci using utf8); convert(@str collate latin1_spanish_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_german2_ci using utf8); convert(@str collate latin1_german2_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_swedish_ci using utf8); convert(@str collate latin1_swedish_ci using utf8) ABC ߲~ @ abc mysql-test/t/ctype_latin1.test +14 −0 Original line number Diff line number Diff line Loading @@ -95,4 +95,18 @@ SET collation_connection='latin1_bin'; CREATE TABLE a (a int); SELECT 'a' as str; # # Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci # The problem was in latin1->utf8->latin1 round trip. # set @str= _latin1 'ABC ߲~ @ abc'; SELECT convert(@str collate latin1_bin using utf8); SELECT convert(@str collate latin1_general_ci using utf8); SELECT convert(@str collate latin1_german1_ci using utf8); SELECT convert(@str collate latin1_danish_ci using utf8); SELECT convert(@str collate latin1_spanish_ci using utf8); SELECT convert(@str collate latin1_german2_ci using utf8); SELECT convert(@str collate latin1_swedish_ci using utf8); # End of 4.1 tests Loading
include/my_sys.h +1 −0 Original line number Diff line number Diff line Loading @@ -850,6 +850,7 @@ my_bool my_gethwaddr(uchar *to); #define PROT_WRITE 2 #define MAP_NORESERVE 0 #define MAP_SHARED 0x0001 #define MAP_PRIVATE 0x0002 #define MAP_NOSYNC 0x0800 #define MAP_FAILED ((void *)-1) #define MS_SYNC 0x0000 Loading
libmysql/libmysql.c +0 −29 Original line number Diff line number Diff line Loading @@ -1380,35 +1380,6 @@ mysql_get_server_info(MYSQL *mysql) } /* Get version number for server in a form easy to test on SYNOPSIS mysql_get_server_version() mysql Connection EXAMPLE 4.1.0-alfa -> 40100 NOTES We will ensure that a newer server always has a bigger number. RETURN Signed number > 323000 */ ulong STDCALL mysql_get_server_version(MYSQL *mysql) { uint major, minor, version; char *pos= mysql->server_version, *end_pos; major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1; version= (uint) strtoul(pos, &end_pos, 10); return (ulong) major*10000L+(ulong) (minor*100+version); } const char * STDCALL mysql_get_host_info(MYSQL *mysql) { Loading
mysql-test/mysql-test-run.pl +53 −2 Original line number Diff line number Diff line Loading @@ -230,6 +230,8 @@ our $opt_client_ddd; our $opt_manual_gdb; our $opt_manual_ddd; our $opt_manual_debug; our $opt_debugger; our $opt_client_debugger; our $opt_gprof; our $opt_gprof_dir; Loading Loading @@ -633,6 +635,8 @@ sub command_line_setup () { 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, 'client-ddd' => \$opt_client_ddd, 'debugger=s' => \$opt_debugger, 'client-debugger=s' => \$opt_client_debugger, 'strace-client' => \$opt_strace_client, 'master-binary=s' => \$exe_master_mysqld, 'slave-binary=s' => \$exe_slave_mysqld, Loading Loading @@ -812,7 +816,8 @@ sub command_line_setup () { # Check debug related options if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug) $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_client_debugger ) { # Indicate that we are using debugger $glob_debugger= 1; Loading Loading @@ -2798,6 +2803,10 @@ sub mysqld_start ($$$$$) { { ddd_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_debugger ) { debugger_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_manual_debug ) { print "\nStart $type in your debugger\n" . Loading Loading @@ -3324,6 +3333,10 @@ sub run_mysqltest ($) { { ddd_arguments(\$args, \$exe, "client"); } elsif ( $opt_client_debugger ) { debugger_arguments(\$args, \$exe, "client"); } if ($glob_use_libtool and $opt_valgrind) { Loading Loading @@ -3476,6 +3489,42 @@ sub ddd_arguments { mtr_add_arg($$args, "$save_exe"); } # # Modify the exe and args so that program is run in the selected debugger # sub debugger_arguments { my $args= shift; my $exe= shift; my $debugger= $opt_debugger || $opt_client_debugger; if ( $debugger eq "vcexpress" or $debugger eq "vc") { # vc[express] /debugexe exe arg1 .. argn # Add /debugexe and name of the exe before args unshift(@$$args, "/debugexe"); unshift(@$$args, "$$exe"); } elsif ( $debugger eq "windbg" ) { # windbg exe arg1 .. argn # Add name of the exe before args unshift(@$$args, "$$exe"); } else { mtr_error("Unknown argument \"$debugger\" passed to --debugger"); } # Set exe to debuggername $$exe= $debugger; } # # Modify the exe and args so that program is run in valgrind # Loading Loading @@ -3588,6 +3637,8 @@ Options for debugging the product client-gdb Start mysqltest client in gdb ddd Start mysqld in ddd client-ddd Start mysqltest client in ddd debugger=NAME Start mysqld in the selected debugger client-debugger=NAME Start mysqltest in the selected debugger strace-client FIXME master-binary=PATH Specify the master "mysqld" to use slave-binary=PATH Specify the slave "mysqld" to use Loading
mysql-test/r/ctype_latin1.result +22 −0 Original line number Diff line number Diff line Loading @@ -369,3 +369,25 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT 'a' as str; str a set @str= _latin1 'ABC ߲~ @ abc'; SELECT convert(@str collate latin1_bin using utf8); convert(@str collate latin1_bin using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_general_ci using utf8); convert(@str collate latin1_general_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_german1_ci using utf8); convert(@str collate latin1_german1_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_danish_ci using utf8); convert(@str collate latin1_danish_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_spanish_ci using utf8); convert(@str collate latin1_spanish_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_german2_ci using utf8); convert(@str collate latin1_german2_ci using utf8) ABC ߲~ @ abc SELECT convert(@str collate latin1_swedish_ci using utf8); convert(@str collate latin1_swedish_ci using utf8) ABC ߲~ @ abc
mysql-test/t/ctype_latin1.test +14 −0 Original line number Diff line number Diff line Loading @@ -95,4 +95,18 @@ SET collation_connection='latin1_bin'; CREATE TABLE a (a int); SELECT 'a' as str; # # Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci # The problem was in latin1->utf8->latin1 round trip. # set @str= _latin1 'ABC ߲~ @ abc'; SELECT convert(@str collate latin1_bin using utf8); SELECT convert(@str collate latin1_general_ci using utf8); SELECT convert(@str collate latin1_german1_ci using utf8); SELECT convert(@str collate latin1_danish_ci using utf8); SELECT convert(@str collate latin1_spanish_ci using utf8); SELECT convert(@str collate latin1_german2_ci using utf8); SELECT convert(@str collate latin1_swedish_ci using utf8); # End of 4.1 tests