Loading Makefile.am +13 −8 Original line number Diff line number Diff line Loading @@ -109,13 +109,18 @@ MYSQL_TEST_RUN_ARGS = --manager-port=$(MYSQL_TEST_MANAGER_PORT) \ --ndbcluster_port=$(MYSQL_TEST_NDB_PORT) test: cd mysql-test ; \ ./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) && \ ./mysql-test-run.pl --ps-protocol $(MYSQL_TEST_RUN_ARGS) ./mysql-test-run \ --manager-port=$(MYSQL_TEST_MANAGER_PORT) \ --master_port=$(MYSQL_TEST_MASTER_PORT) \ --slave_port=$(MYSQL_TEST_SLAVE_PORT) \ --ndbcluster_port=$(MYSQL_TEST_NDB_PORT) && \ ./mysql-test-run --ps-protocol \ --manager-port=$(MYSQL_TEST_MANAGER_PORT) \ --master_port=$(MYSQL_TEST_MASTER_PORT) \ --slave_port=$(MYSQL_TEST_SLAVE_PORT) \ --ndbcluster_port=$(MYSQL_TEST_NDB_PORT) test-force: cd mysql-test; \ ./mysql-test-run --force $(MYSQL_TEST_RUN_ARGS) ; \ ./mysql-test-run --ps-protocol --force $(MYSQL_TEST_RUN_ARGS) # Don't update the files from bitkeeper %::SCCS/s.% ./mysql-test-run --force ;\ ./mysql-test-run --ps-protocol --force client/mysql.cc +2 −2 Original line number Diff line number Diff line Loading @@ -1014,13 +1014,13 @@ static int read_and_execute(bool interactive) unsigned long clen; do { line= my_cgets(tmpbuf.c_ptr(), tmpbuf.alloced_length(), &clen); line= my_cgets(tmpbuf.ptr(), tmpbuf.alloced_length()-1, &clen); buffer.append(line, clen); /* if we got buffer fully filled than there is a chance that something else is still in console input buffer */ } while (tmpbuf.alloced_length() <= clen + 1); } while (tmpbuf.alloced_length() <= clen); line= buffer.c_ptr(); #else /* OS2 */ buffer.length(0); Loading client/mysqltest.c +34 −26 Original line number Diff line number Diff line Loading @@ -64,8 +64,12 @@ #include <sys/wait.h> #endif #ifndef WEXITSTATUS # ifdef __WIN__ # define WEXITSTATUS(stat_val) (stat_val) # else # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) # endif #endif /* MAX_QUERY is 256K -- there is a test in sp-big that is >128K */ #define MAX_QUERY (256*1024) #define MAX_VAR_NAME 256 Loading Loading @@ -609,6 +613,7 @@ static void die(const char *fmt, ...) if (cur_file && cur_file != file_stack) fprintf(stderr, "In included file \"%s\": ", cur_file->file_name); if (start_lineno != 0) fprintf(stderr, "At line %u: ", start_lineno); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); Loading Loading @@ -642,7 +647,9 @@ static void verbose_msg(const char *fmt, ...) va_start(args, fmt); fprintf(stderr, "mysqltest: At line %u: ", start_lineno); fprintf(stderr, "mysqltest: "); if (start_lineno > 0) fprintf(stderr, "At line %u: ", start_lineno); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); va_end(args); Loading Loading @@ -1097,8 +1104,8 @@ static void do_exec(struct st_query *query) (query->expected_errno[i].code.errnum == status)) { ok= 1; verbose_msg("command \"%s\" failed with expected error: %d", cmd, status); DBUG_PRINT("info", ("command \"%s\" failed with expected error: %d", cmd, status)); } } if (!ok) Loading Loading @@ -1383,9 +1390,7 @@ int do_sync_with_master2(long offset) int rpl_parse; if (!master_pos.file[0]) { die("Line %u: Calling 'sync_with_master' without calling 'save_master_pos'", start_lineno); } die("Calling 'sync_with_master' without calling 'save_master_pos'"); rpl_parse= mysql_rpl_parse_enabled(mysql); mysql_disable_rpl_parse(mysql); Loading @@ -1395,14 +1400,13 @@ int do_sync_with_master2(long offset) wait_for_position: if (mysql_query(mysql, query_buf)) die("line %u: failed in %s: %d: %s", start_lineno, query_buf, mysql_errno(mysql), mysql_error(mysql)); die("failed in %s: %d: %s", query_buf, mysql_errno(mysql), mysql_error(mysql)); if (!(last_result= res= mysql_store_result(mysql))) die("line %u: mysql_store_result() returned NULL for '%s'", start_lineno, query_buf); die("mysql_store_result() returned NULL for '%s'", query_buf); if (!(row= mysql_fetch_row(res))) die("line %u: empty result in %s", start_lineno, query_buf); die("empty result in %s", query_buf); if (!row[0]) { /* Loading @@ -1410,10 +1414,7 @@ int do_sync_with_master2(long offset) SLAVE has been issued ? */ if (tries++ == 3) { die("line %u: could not sync with master ('%s' returned NULL)", start_lineno, query_buf); } die("could not sync with master ('%s' returned NULL)", query_buf); sleep(1); /* So at most we will wait 3 seconds and make 4 tries */ mysql_free_result(res); goto wait_for_position; Loading Loading @@ -1459,10 +1460,9 @@ int do_save_master_pos() mysql_errno(mysql), mysql_error(mysql)); if (!(last_result =res = mysql_store_result(mysql))) die("line %u: mysql_store_result() retuned NULL for '%s'", start_lineno, query); die("mysql_store_result() retuned NULL for '%s'", query); if (!(row = mysql_fetch_row(res))) die("line %u: empty result in show master status", start_lineno); die("empty result in show master status"); strnmov(master_pos.file, row[0], sizeof(master_pos.file)-1); master_pos.pos = strtoul(row[1], (char**) 0, 10); mysql_free_result(res); last_result=0; Loading Loading @@ -2768,7 +2768,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), fn_format(buff, argument, "", "", 4); DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0); if (!(cur_file->file= my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(MY_WME)))) my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) die("Could not open %s: errno = %d", buff, errno); cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); break; Loading Loading @@ -4304,13 +4304,21 @@ int main(int argc, char **argv) if (res_info.st_size) error|= (RESULT_CONTENT_MISMATCH | RESULT_LENGTH_MISMATCH); } if (result_file && ds_res.length && !error) if (ds_res.length && !error) { if (result_file) { if (!record) error |= check_result(&ds_res, result_file, q->require_file); else str_to_file(result_file, ds_res.str, ds_res.length); } else { // Print the result to stdout printf("%s", ds_res.str); } } dynstr_free(&ds_res); if (!silent) Loading config/ac-macros/yassl.m4 +4 −3 Original line number Diff line number Diff line Loading @@ -23,10 +23,11 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [ # System specific checks yassl_integer_extra_cxxflags="" case $SYSTEM_TYPE--$CXX_VERSION in sparc*solaris*--*Sun*C++*5.6*) case $host_cpu--$CXX_VERSION in sparc*--*Sun*C++*5.6*) # Disable inlining when compiling taocrypt/src/integer.cpp yassl_integer_extra_cxxflags="+d" AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/integer.cpp]) ;; esac AC_SUBST([yassl_integer_extra_cxxflags]) Loading extra/yassl/mySTL/vector.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ struct vector_base { vector_base() : start_(0), finish_(0), end_of_storage_(0) {} vector_base(size_t n) { start_ = static_cast<T*>(malloc(n * sizeof(T))); // Don't allow malloc(0), if n is 0 use 1 start_ = static_cast<T*>(malloc((n ? n : 1) * sizeof(T))); if (!start_) abort(); finish_ = start_; end_of_storage_ = start_ + n; Loading Loading
Makefile.am +13 −8 Original line number Diff line number Diff line Loading @@ -109,13 +109,18 @@ MYSQL_TEST_RUN_ARGS = --manager-port=$(MYSQL_TEST_MANAGER_PORT) \ --ndbcluster_port=$(MYSQL_TEST_NDB_PORT) test: cd mysql-test ; \ ./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) && \ ./mysql-test-run.pl --ps-protocol $(MYSQL_TEST_RUN_ARGS) ./mysql-test-run \ --manager-port=$(MYSQL_TEST_MANAGER_PORT) \ --master_port=$(MYSQL_TEST_MASTER_PORT) \ --slave_port=$(MYSQL_TEST_SLAVE_PORT) \ --ndbcluster_port=$(MYSQL_TEST_NDB_PORT) && \ ./mysql-test-run --ps-protocol \ --manager-port=$(MYSQL_TEST_MANAGER_PORT) \ --master_port=$(MYSQL_TEST_MASTER_PORT) \ --slave_port=$(MYSQL_TEST_SLAVE_PORT) \ --ndbcluster_port=$(MYSQL_TEST_NDB_PORT) test-force: cd mysql-test; \ ./mysql-test-run --force $(MYSQL_TEST_RUN_ARGS) ; \ ./mysql-test-run --ps-protocol --force $(MYSQL_TEST_RUN_ARGS) # Don't update the files from bitkeeper %::SCCS/s.% ./mysql-test-run --force ;\ ./mysql-test-run --ps-protocol --force
client/mysql.cc +2 −2 Original line number Diff line number Diff line Loading @@ -1014,13 +1014,13 @@ static int read_and_execute(bool interactive) unsigned long clen; do { line= my_cgets(tmpbuf.c_ptr(), tmpbuf.alloced_length(), &clen); line= my_cgets(tmpbuf.ptr(), tmpbuf.alloced_length()-1, &clen); buffer.append(line, clen); /* if we got buffer fully filled than there is a chance that something else is still in console input buffer */ } while (tmpbuf.alloced_length() <= clen + 1); } while (tmpbuf.alloced_length() <= clen); line= buffer.c_ptr(); #else /* OS2 */ buffer.length(0); Loading
client/mysqltest.c +34 −26 Original line number Diff line number Diff line Loading @@ -64,8 +64,12 @@ #include <sys/wait.h> #endif #ifndef WEXITSTATUS # ifdef __WIN__ # define WEXITSTATUS(stat_val) (stat_val) # else # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) # endif #endif /* MAX_QUERY is 256K -- there is a test in sp-big that is >128K */ #define MAX_QUERY (256*1024) #define MAX_VAR_NAME 256 Loading Loading @@ -609,6 +613,7 @@ static void die(const char *fmt, ...) if (cur_file && cur_file != file_stack) fprintf(stderr, "In included file \"%s\": ", cur_file->file_name); if (start_lineno != 0) fprintf(stderr, "At line %u: ", start_lineno); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); Loading Loading @@ -642,7 +647,9 @@ static void verbose_msg(const char *fmt, ...) va_start(args, fmt); fprintf(stderr, "mysqltest: At line %u: ", start_lineno); fprintf(stderr, "mysqltest: "); if (start_lineno > 0) fprintf(stderr, "At line %u: ", start_lineno); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); va_end(args); Loading Loading @@ -1097,8 +1104,8 @@ static void do_exec(struct st_query *query) (query->expected_errno[i].code.errnum == status)) { ok= 1; verbose_msg("command \"%s\" failed with expected error: %d", cmd, status); DBUG_PRINT("info", ("command \"%s\" failed with expected error: %d", cmd, status)); } } if (!ok) Loading Loading @@ -1383,9 +1390,7 @@ int do_sync_with_master2(long offset) int rpl_parse; if (!master_pos.file[0]) { die("Line %u: Calling 'sync_with_master' without calling 'save_master_pos'", start_lineno); } die("Calling 'sync_with_master' without calling 'save_master_pos'"); rpl_parse= mysql_rpl_parse_enabled(mysql); mysql_disable_rpl_parse(mysql); Loading @@ -1395,14 +1400,13 @@ int do_sync_with_master2(long offset) wait_for_position: if (mysql_query(mysql, query_buf)) die("line %u: failed in %s: %d: %s", start_lineno, query_buf, mysql_errno(mysql), mysql_error(mysql)); die("failed in %s: %d: %s", query_buf, mysql_errno(mysql), mysql_error(mysql)); if (!(last_result= res= mysql_store_result(mysql))) die("line %u: mysql_store_result() returned NULL for '%s'", start_lineno, query_buf); die("mysql_store_result() returned NULL for '%s'", query_buf); if (!(row= mysql_fetch_row(res))) die("line %u: empty result in %s", start_lineno, query_buf); die("empty result in %s", query_buf); if (!row[0]) { /* Loading @@ -1410,10 +1414,7 @@ int do_sync_with_master2(long offset) SLAVE has been issued ? */ if (tries++ == 3) { die("line %u: could not sync with master ('%s' returned NULL)", start_lineno, query_buf); } die("could not sync with master ('%s' returned NULL)", query_buf); sleep(1); /* So at most we will wait 3 seconds and make 4 tries */ mysql_free_result(res); goto wait_for_position; Loading Loading @@ -1459,10 +1460,9 @@ int do_save_master_pos() mysql_errno(mysql), mysql_error(mysql)); if (!(last_result =res = mysql_store_result(mysql))) die("line %u: mysql_store_result() retuned NULL for '%s'", start_lineno, query); die("mysql_store_result() retuned NULL for '%s'", query); if (!(row = mysql_fetch_row(res))) die("line %u: empty result in show master status", start_lineno); die("empty result in show master status"); strnmov(master_pos.file, row[0], sizeof(master_pos.file)-1); master_pos.pos = strtoul(row[1], (char**) 0, 10); mysql_free_result(res); last_result=0; Loading Loading @@ -2768,7 +2768,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), fn_format(buff, argument, "", "", 4); DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0); if (!(cur_file->file= my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(MY_WME)))) my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) die("Could not open %s: errno = %d", buff, errno); cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); break; Loading Loading @@ -4304,13 +4304,21 @@ int main(int argc, char **argv) if (res_info.st_size) error|= (RESULT_CONTENT_MISMATCH | RESULT_LENGTH_MISMATCH); } if (result_file && ds_res.length && !error) if (ds_res.length && !error) { if (result_file) { if (!record) error |= check_result(&ds_res, result_file, q->require_file); else str_to_file(result_file, ds_res.str, ds_res.length); } else { // Print the result to stdout printf("%s", ds_res.str); } } dynstr_free(&ds_res); if (!silent) Loading
config/ac-macros/yassl.m4 +4 −3 Original line number Diff line number Diff line Loading @@ -23,10 +23,11 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [ # System specific checks yassl_integer_extra_cxxflags="" case $SYSTEM_TYPE--$CXX_VERSION in sparc*solaris*--*Sun*C++*5.6*) case $host_cpu--$CXX_VERSION in sparc*--*Sun*C++*5.6*) # Disable inlining when compiling taocrypt/src/integer.cpp yassl_integer_extra_cxxflags="+d" AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/integer.cpp]) ;; esac AC_SUBST([yassl_integer_extra_cxxflags]) Loading
extra/yassl/mySTL/vector.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ struct vector_base { vector_base() : start_(0), finish_(0), end_of_storage_(0) {} vector_base(size_t n) { start_ = static_cast<T*>(malloc(n * sizeof(T))); // Don't allow malloc(0), if n is 0 use 1 start_ = static_cast<T*>(malloc((n ? n : 1) * sizeof(T))); if (!start_) abort(); finish_ = start_; end_of_storage_ = start_ + n; Loading