Loading BUILD/check-cpu +29 −6 Original line number Diff line number Diff line Loading @@ -5,9 +5,13 @@ # check_cpu () { if test -r /proc/cpuinfo ; then CPUINFO=/proc/cpuinfo if test -n "$TEST_CPUINFO" ; then CPUINFO=$TEST_CPUINFO fi if test -r "$CPUINFO" -a "$CPUINFO" != " " ; then # on Linux (and others?) we can get detailed CPU information out of /proc cpuinfo="cat /proc/cpuinfo" cpuinfo="cat $CPUINFO" # detect CPU family cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1` Loading @@ -28,11 +32,12 @@ check_cpu () { fi # parse CPU flags for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do eval cpu_flag_$flag=yes done else # Fallback when there is no /proc/cpuinfo CPUINFO=" " case "`uname -s`" in FreeBSD|OpenBSD) cpu_family=`uname -m`; Loading Loading @@ -84,6 +89,18 @@ check_cpu () { *Pentium*M*pro*) cpu_arg="pentium-m"; ;; *Celeron\(R\)*\ M*) cpu_arg="pentium-m"; ;; *Celeron*Coppermine*) cpu_arg="pentium3" ;; *Celeron\(R\)*) cpu_arg="pentium4" ;; *Celeron*) cpu_arg="pentium2"; ;; *Athlon*64*) cpu_arg="athlon64"; ;; Loading Loading @@ -114,6 +131,13 @@ check_cpu () { if test -z "$cpu_arg" ; then if test "$CPUINFO" != " " ; then # fallback to uname if necessary TEST_CPUINFO=" " check_cpu_cflags="" check_cpu return fi echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2 check_cpu_cflags="" return Loading Loading @@ -167,8 +191,7 @@ check_cpu () { touch __test.c while [ "$cpu_arg" ] ; do # FIXME: echo -n isn't portable - see contortions autoconf goes through echo -n testing $cpu_arg "... " >&2 printf "testing $cpu_arg ... " >&2 # compile check check_cpu_cflags=`eval echo $check_cpu_args` Loading BitKeeper/etc/collapsed +1 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,4 @@ 454f8960jsVT_kMKJtZ9OCgXoba0xQ 4554a95d7txO1DuO9G3nAizI3SkFAA 4554b3722d71SbPiI2Gx-RhbZjmuIQ 45ae6628gqKTsUFfnoNExadETVIkbA Makefile.am +26 −25 Original line number Diff line number Diff line Loading @@ -95,7 +95,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 @@ -105,36 +109,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 # To ease script-writing, although in 4.1 it is identical to 'test' test-full: test # We are testing a new Perl version of the test script test-pl: cd mysql-test; \ ./mysql-test-run.pl && \ ./mysql-test-run.pl --ps-protocol test-force: $(MAKE) force=--force test test-force-pl: cd mysql-test; \ ./mysql-test-run.pl --force && \ ./mysql-test-run.pl --ps-protocol --force test-force-full: $(MAKE) force=--force test-full #used by autopush.pl to run memory based tests test-force-pl-mem: cd mysql-test; \ ./mysql-test-run.pl --force --mem && \ ./mysql-test-run.pl --ps-protocol --force --mem 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/mysqldump.c +13 −5 Original line number Diff line number Diff line Loading @@ -2589,6 +2589,8 @@ static char *primary_key_fields(const char *table_name) char show_keys_buff[15 + 64 * 2 + 3]; uint result_length = 0; char *result = 0; char buff[NAME_LEN * 2 + 3]; char *quoted_field; my_snprintf(show_keys_buff, sizeof(show_keys_buff), "SHOW KEYS FROM %s", table_name); Loading @@ -2612,8 +2614,10 @@ static char *primary_key_fields(const char *table_name) { /* Key is unique */ do result_length += strlen(row[4]) + 1; /* + 1 for ',' or \0 */ while ((row = mysql_fetch_row(res)) && atoi(row[3]) > 1); { quoted_field= quote_name(row[4], buff, 0); result_length+= strlen(quoted_field) + 1; /* + 1 for ',' or \0 */ } while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1); } /* Build the ORDER BY clause result */ Loading @@ -2627,9 +2631,13 @@ static char *primary_key_fields(const char *table_name) } mysql_data_seek(res, 0); row = mysql_fetch_row(res); end = strmov(result, row[4]); quoted_field= quote_name(row[4], buff, 0); end= strmov(result, quoted_field); while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1) end = strxmov(end, ",", row[4], NullS); { quoted_field= quote_name(row[4], buff, 0); end= strxmov(end, ",", quoted_field, NullS); } } cleanup: Loading client/mysqltest.c +14 −5 Original line number Diff line number Diff line Loading @@ -1240,7 +1240,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 @@ -2968,7 +2970,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host, if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR || mysql_errno(mysql) == CR_CONNECTION_ERROR) && failed_attempts < opt_max_connect_retries) { verbose_msg("Connect attempt %d/%d failed: %d: %s", failed_attempts, opt_max_connect_retries, mysql_errno(mysql), mysql_error(mysql)); my_sleep(connection_retry_sleep); } else { if (failed_attempts > 0) Loading Loading @@ -4678,10 +4685,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 @@ -4733,7 +4739,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
BUILD/check-cpu +29 −6 Original line number Diff line number Diff line Loading @@ -5,9 +5,13 @@ # check_cpu () { if test -r /proc/cpuinfo ; then CPUINFO=/proc/cpuinfo if test -n "$TEST_CPUINFO" ; then CPUINFO=$TEST_CPUINFO fi if test -r "$CPUINFO" -a "$CPUINFO" != " " ; then # on Linux (and others?) we can get detailed CPU information out of /proc cpuinfo="cat /proc/cpuinfo" cpuinfo="cat $CPUINFO" # detect CPU family cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1` Loading @@ -28,11 +32,12 @@ check_cpu () { fi # parse CPU flags for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do eval cpu_flag_$flag=yes done else # Fallback when there is no /proc/cpuinfo CPUINFO=" " case "`uname -s`" in FreeBSD|OpenBSD) cpu_family=`uname -m`; Loading Loading @@ -84,6 +89,18 @@ check_cpu () { *Pentium*M*pro*) cpu_arg="pentium-m"; ;; *Celeron\(R\)*\ M*) cpu_arg="pentium-m"; ;; *Celeron*Coppermine*) cpu_arg="pentium3" ;; *Celeron\(R\)*) cpu_arg="pentium4" ;; *Celeron*) cpu_arg="pentium2"; ;; *Athlon*64*) cpu_arg="athlon64"; ;; Loading Loading @@ -114,6 +131,13 @@ check_cpu () { if test -z "$cpu_arg" ; then if test "$CPUINFO" != " " ; then # fallback to uname if necessary TEST_CPUINFO=" " check_cpu_cflags="" check_cpu return fi echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2 check_cpu_cflags="" return Loading Loading @@ -167,8 +191,7 @@ check_cpu () { touch __test.c while [ "$cpu_arg" ] ; do # FIXME: echo -n isn't portable - see contortions autoconf goes through echo -n testing $cpu_arg "... " >&2 printf "testing $cpu_arg ... " >&2 # compile check check_cpu_cflags=`eval echo $check_cpu_args` Loading
BitKeeper/etc/collapsed +1 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,4 @@ 454f8960jsVT_kMKJtZ9OCgXoba0xQ 4554a95d7txO1DuO9G3nAizI3SkFAA 4554b3722d71SbPiI2Gx-RhbZjmuIQ 45ae6628gqKTsUFfnoNExadETVIkbA
Makefile.am +26 −25 Original line number Diff line number Diff line Loading @@ -95,7 +95,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 @@ -105,36 +109,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 # To ease script-writing, although in 4.1 it is identical to 'test' test-full: test # We are testing a new Perl version of the test script test-pl: cd mysql-test; \ ./mysql-test-run.pl && \ ./mysql-test-run.pl --ps-protocol test-force: $(MAKE) force=--force test test-force-pl: cd mysql-test; \ ./mysql-test-run.pl --force && \ ./mysql-test-run.pl --ps-protocol --force test-force-full: $(MAKE) force=--force test-full #used by autopush.pl to run memory based tests test-force-pl-mem: cd mysql-test; \ ./mysql-test-run.pl --force --mem && \ ./mysql-test-run.pl --ps-protocol --force --mem 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/mysqldump.c +13 −5 Original line number Diff line number Diff line Loading @@ -2589,6 +2589,8 @@ static char *primary_key_fields(const char *table_name) char show_keys_buff[15 + 64 * 2 + 3]; uint result_length = 0; char *result = 0; char buff[NAME_LEN * 2 + 3]; char *quoted_field; my_snprintf(show_keys_buff, sizeof(show_keys_buff), "SHOW KEYS FROM %s", table_name); Loading @@ -2612,8 +2614,10 @@ static char *primary_key_fields(const char *table_name) { /* Key is unique */ do result_length += strlen(row[4]) + 1; /* + 1 for ',' or \0 */ while ((row = mysql_fetch_row(res)) && atoi(row[3]) > 1); { quoted_field= quote_name(row[4], buff, 0); result_length+= strlen(quoted_field) + 1; /* + 1 for ',' or \0 */ } while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1); } /* Build the ORDER BY clause result */ Loading @@ -2627,9 +2631,13 @@ static char *primary_key_fields(const char *table_name) } mysql_data_seek(res, 0); row = mysql_fetch_row(res); end = strmov(result, row[4]); quoted_field= quote_name(row[4], buff, 0); end= strmov(result, quoted_field); while ((row= mysql_fetch_row(res)) && atoi(row[3]) > 1) end = strxmov(end, ",", row[4], NullS); { quoted_field= quote_name(row[4], buff, 0); end= strxmov(end, ",", quoted_field, NullS); } } cleanup: Loading
client/mysqltest.c +14 −5 Original line number Diff line number Diff line Loading @@ -1240,7 +1240,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 @@ -2968,7 +2970,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host, if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR || mysql_errno(mysql) == CR_CONNECTION_ERROR) && failed_attempts < opt_max_connect_retries) { verbose_msg("Connect attempt %d/%d failed: %d: %s", failed_attempts, opt_max_connect_retries, mysql_errno(mysql), mysql_error(mysql)); my_sleep(connection_retry_sleep); } else { if (failed_attempts > 0) Loading Loading @@ -4678,10 +4685,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 @@ -4733,7 +4739,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