Loading Docs/Makefile.am +11 −11 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ all-local: $(TXT_FILES) # make sure that "make install" installs the info page, too # automake only seems to take care of this automatically, # if we're building the info page from texi directly. install-data-hook: mysql.info install-data-hook: $(srcdir)/mysql.info $(mkinstalldirs) $(DESTDIR)$(infodir) $(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) Loading @@ -44,23 +44,23 @@ CLEAN_FILES: $(TXT_FILES) GT = $(srcdir)/generate-text-files.pl ../INSTALL-SOURCE: mysql.info $(GT) perl -w $(GT) mysql.info "installing-source" "windows-source-build" > $@ ../INSTALL-SOURCE: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "installing-source" "windows-source-build" > $@ ../INSTALL-WIN-SOURCE: mysql.info $(GT) perl -w $(GT) mysql.info "windows-source-build" "post-installation" > $@ ../INSTALL-WIN-SOURCE: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "windows-source-build" "post-installation" > $@ # We put the description for the binary installation here so that # people who download source wont have to see it. It is moved up to # the toplevel by the script that makes the binary tar files. INSTALL-BINARY: mysql.info $(GT) perl -w $(GT) mysql.info "installing-binary" "installing-source" > $@ INSTALL-BINARY: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "installing-binary" "installing-source" > $@ ../EXCEPTIONS-CLIENT: mysql.info $(GT) perl -w $(GT) mysql.info "mysql-floss-license-exception" "function-index" > $@ ../EXCEPTIONS-CLIENT: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "mysql-floss-license-exception" "function-index" > $@ ../support-files/MacOSX/ReadMe.txt: mysql.info $(GT) perl -w $(GT) mysql.info "mac-os-x-installation" "netware-installation" > $@ ../support-files/MacOSX/ReadMe.txt: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "mac-os-x-installation" "netware-installation" > $@ # Include the Windows manual.chm in source .tar.gz only if available. # It is not in BitKeeper, but is downloaded from intranet by Bootstrap. Loading Makefile.am +5 −0 Original line number Diff line number Diff line Loading @@ -142,10 +142,15 @@ test-force: 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 # Don't update the files from bitkeeper Loading client/mysql_upgrade.c +8 −6 Original line number Diff line number Diff line Loading @@ -373,14 +373,17 @@ static int comp_names(struct fileinfo *a, struct fileinfo *b) } static int find_file(const char *name, const char *root, uint flags, char *result, size_t len, ...) static int find_file(const char *name, const char *root, uint flags, char *result, size_t len, ...) { int ret; int ret= 1; va_list va; FILEINFO key= { (char*)name, NULL }; const char *subdir; char *cp; FILEINFO key; /* Init key with name of the file to look for */ key.name= (char*)name; DBUG_ASSERT(root != NULL); Loading @@ -388,7 +391,6 @@ find_file(const char *name, const char *root, uint flags, char *result, size_t l if (cp[-1] != FN_LIBCHAR) *cp++= FN_LIBCHAR; ret= 1; va_start(va, len); subdir= (!(flags & MY_SEARCH_SELF)) ? va_arg(va, char *) : ""; while (subdir) Loading client/mysqltest.c +78 −10 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ Matt Wagner <matt@mysql.com> Monty Jani Holyfoot */ #define MTEST_VERSION "3.0" Loading Loading @@ -222,6 +223,12 @@ struct st_connection MYSQL* util_mysql; char *name; MYSQL_STMT* stmt; const char *cur_query; int cur_query_len; pthread_mutex_t mutex; pthread_cond_t cond; int query_done; }; struct st_connection connections[128]; struct st_connection* cur_con, *next_con, *connections_end; Loading Loading @@ -460,7 +467,6 @@ void mysql_disable_rpl_parse(MYSQL* mysql __attribute__((unused))) {} int mysql_rpl_parse_enabled(MYSQL* mysql __attribute__((unused))) { return 1; } my_bool mysql_rpl_probe(MYSQL *mysql __attribute__((unused))) { return 1; } #endif void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, int len); void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val); Loading @@ -471,7 +477,56 @@ void handle_error(struct st_command*, const char *err_sqlstate, DYNAMIC_STRING *ds); void handle_no_error(struct st_command*); #ifdef EMBEDDED_LIBRARY /* send_one_query executes query in separate thread what is necessary in embedded library to run 'send' in proper way. This implementation doesn't handle errors returned by mysql_send_query. It's technically possible, though i don't see where it is needed. */ pthread_handler_t send_one_query(void *arg) { struct st_connection *cn= (struct st_connection*)arg; mysql_thread_init(); VOID(mysql_send_query(&cn->mysql, cn->cur_query, cn->cur_query_len)); mysql_thread_end(); pthread_mutex_lock(&cn->mutex); cn->query_done= 1; VOID(pthread_cond_signal(&cn->cond)); pthread_mutex_unlock(&cn->mutex); pthread_exit(0); return 0; } static int do_send_query(struct st_connection *cn, const char *q, int q_len, int flags) { pthread_t tid; if (flags & QUERY_REAP_FLAG) return mysql_send_query(&cn->mysql, q, q_len); if (pthread_mutex_init(&cn->mutex, NULL) || pthread_cond_init(&cn->cond, NULL)) die("Error in the thread library"); cn->cur_query= q; cn->cur_query_len= q_len; cn->query_done= 0; if (pthread_create(&tid, NULL, send_one_query, (void*)cn)) die("Cannot start new thread for query"); return 0; } #else /*EMBEDDED_LIBRARY*/ #define do_send_query(cn,q,q_len,flags) mysql_send_query(&cn->mysql, q, q_len) #endif /*EMBEDDED_LIBRARY*/ void do_eval(DYNAMIC_STRING *query_eval, const char *query, const char *query_end, my_bool pass_through_escape_chars) Loading Loading @@ -4506,7 +4561,6 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql) } /* Run query using MySQL C API Loading @@ -4523,11 +4577,12 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql) error - function will not return */ void run_query_normal(MYSQL *mysql, struct st_command *command, void run_query_normal(struct st_connection *cn, struct st_command *command, int flags, char *query, int query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings) { MYSQL_RES *res= 0; MYSQL *mysql= &cn->mysql; int err= 0, counter= 0; DBUG_ENTER("run_query_normal"); DBUG_PRINT("enter",("flags: %d", flags)); Loading @@ -4538,14 +4593,26 @@ void run_query_normal(MYSQL *mysql, struct st_command *command, /* Send the query */ if (mysql_send_query(mysql, query, query_len)) if (do_send_query(cn, query, query_len, flags)) { handle_error(command, mysql_errno(mysql), mysql_error(mysql), mysql_sqlstate(mysql), ds); goto end; } } #ifdef EMBEDDED_LIBRARY /* Here we handle 'reap' command, so we need to check if the query's thread was finished and probably wait */ else if (flags & QUERY_REAP_FLAG) { pthread_mutex_lock(&cn->mutex); while (!cn->query_done) pthread_cond_wait(&cn->cond, &cn->mutex); pthread_mutex_unlock(&cn->mutex); } #endif /*EMBEDDED_LIBRARY*/ if (!(flags & QUERY_REAP_FLAG)) DBUG_VOID_RETURN; Loading Loading @@ -5036,8 +5103,9 @@ int util_query(MYSQL* org_mysql, const char* query){ */ void run_query(MYSQL *mysql, struct st_command *command, int flags) void run_query(struct st_connection *cn, struct st_command *command, int flags) { MYSQL *mysql= &cn->mysql; DYNAMIC_STRING *ds; DYNAMIC_STRING ds_result; DYNAMIC_STRING ds_warnings; Loading Loading @@ -5194,7 +5262,7 @@ void run_query(MYSQL *mysql, struct st_command *command, int flags) match_re(&ps_re, query)) run_query_stmt(mysql, command, query, query_len, ds, &ds_warnings); else run_query_normal(mysql, command, flags, query, query_len, run_query_normal(cn, command, flags, query, query_len, ds, &ds_warnings); if (sp_created) Loading Loading @@ -5659,7 +5727,7 @@ int main(int argc, char **argv) strmake(command->require_file, save_file, sizeof(save_file)); save_file[0]= 0; } run_query(&cur_con->mysql, command, QUERY_REAP_FLAG|QUERY_SEND_FLAG); run_query(cur_con, command, QUERY_REAP_FLAG|QUERY_SEND_FLAG); display_result_vertically= old_display_result_vertically; command->last_argument= command->end; command_executed++; Loading Loading @@ -5690,7 +5758,7 @@ int main(int argc, char **argv) strmake(command->require_file, save_file, sizeof(save_file)); save_file[0]= 0; } run_query(&cur_con->mysql, command, flags); run_query(cur_con, command, flags); command_executed++; command->last_argument= command->end; break; Loading @@ -5716,7 +5784,7 @@ int main(int argc, char **argv) the query and read the result some time later when reap instruction is given on this connection. */ run_query(&cur_con->mysql, command, QUERY_SEND_FLAG); run_query(cur_con, command, QUERY_SEND_FLAG); command_executed++; command->last_argument= command->end; break; Loading config/ac-macros/ha_ndbcluster.m4 +1 −1 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [ ndb_cxxflags_fix="" TEST_NDBCLUSTER="--ndbcluster" ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_builddir)/storage/ndb/include/ndbapi -I\$(top_builddir)/storage/ndb/include/mgmapi" ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include/ndbapi -I\$(top_srcdir)/storage/ndb/include/mgmapi" ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a" ndbcluster_system_libs="" ndb_mgmclient_libs="\$(top_builddir)/storage/ndb/src/mgmclient/libndbmgmclient.la" Loading Loading
Docs/Makefile.am +11 −11 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ all-local: $(TXT_FILES) # make sure that "make install" installs the info page, too # automake only seems to take care of this automatically, # if we're building the info page from texi directly. install-data-hook: mysql.info install-data-hook: $(srcdir)/mysql.info $(mkinstalldirs) $(DESTDIR)$(infodir) $(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) Loading @@ -44,23 +44,23 @@ CLEAN_FILES: $(TXT_FILES) GT = $(srcdir)/generate-text-files.pl ../INSTALL-SOURCE: mysql.info $(GT) perl -w $(GT) mysql.info "installing-source" "windows-source-build" > $@ ../INSTALL-SOURCE: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "installing-source" "windows-source-build" > $@ ../INSTALL-WIN-SOURCE: mysql.info $(GT) perl -w $(GT) mysql.info "windows-source-build" "post-installation" > $@ ../INSTALL-WIN-SOURCE: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "windows-source-build" "post-installation" > $@ # We put the description for the binary installation here so that # people who download source wont have to see it. It is moved up to # the toplevel by the script that makes the binary tar files. INSTALL-BINARY: mysql.info $(GT) perl -w $(GT) mysql.info "installing-binary" "installing-source" > $@ INSTALL-BINARY: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "installing-binary" "installing-source" > $@ ../EXCEPTIONS-CLIENT: mysql.info $(GT) perl -w $(GT) mysql.info "mysql-floss-license-exception" "function-index" > $@ ../EXCEPTIONS-CLIENT: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "mysql-floss-license-exception" "function-index" > $@ ../support-files/MacOSX/ReadMe.txt: mysql.info $(GT) perl -w $(GT) mysql.info "mac-os-x-installation" "netware-installation" > $@ ../support-files/MacOSX/ReadMe.txt: $(srcdir)/mysql.info $(GT) perl -w $(GT) $(srcdir)/mysql.info "mac-os-x-installation" "netware-installation" > $@ # Include the Windows manual.chm in source .tar.gz only if available. # It is not in BitKeeper, but is downloaded from intranet by Bootstrap. Loading
Makefile.am +5 −0 Original line number Diff line number Diff line Loading @@ -142,10 +142,15 @@ test-force: 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 # Don't update the files from bitkeeper Loading
client/mysql_upgrade.c +8 −6 Original line number Diff line number Diff line Loading @@ -373,14 +373,17 @@ static int comp_names(struct fileinfo *a, struct fileinfo *b) } static int find_file(const char *name, const char *root, uint flags, char *result, size_t len, ...) static int find_file(const char *name, const char *root, uint flags, char *result, size_t len, ...) { int ret; int ret= 1; va_list va; FILEINFO key= { (char*)name, NULL }; const char *subdir; char *cp; FILEINFO key; /* Init key with name of the file to look for */ key.name= (char*)name; DBUG_ASSERT(root != NULL); Loading @@ -388,7 +391,6 @@ find_file(const char *name, const char *root, uint flags, char *result, size_t l if (cp[-1] != FN_LIBCHAR) *cp++= FN_LIBCHAR; ret= 1; va_start(va, len); subdir= (!(flags & MY_SEARCH_SELF)) ? va_arg(va, char *) : ""; while (subdir) Loading
client/mysqltest.c +78 −10 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ Matt Wagner <matt@mysql.com> Monty Jani Holyfoot */ #define MTEST_VERSION "3.0" Loading Loading @@ -222,6 +223,12 @@ struct st_connection MYSQL* util_mysql; char *name; MYSQL_STMT* stmt; const char *cur_query; int cur_query_len; pthread_mutex_t mutex; pthread_cond_t cond; int query_done; }; struct st_connection connections[128]; struct st_connection* cur_con, *next_con, *connections_end; Loading Loading @@ -460,7 +467,6 @@ void mysql_disable_rpl_parse(MYSQL* mysql __attribute__((unused))) {} int mysql_rpl_parse_enabled(MYSQL* mysql __attribute__((unused))) { return 1; } my_bool mysql_rpl_probe(MYSQL *mysql __attribute__((unused))) { return 1; } #endif void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, int len); void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val); Loading @@ -471,7 +477,56 @@ void handle_error(struct st_command*, const char *err_sqlstate, DYNAMIC_STRING *ds); void handle_no_error(struct st_command*); #ifdef EMBEDDED_LIBRARY /* send_one_query executes query in separate thread what is necessary in embedded library to run 'send' in proper way. This implementation doesn't handle errors returned by mysql_send_query. It's technically possible, though i don't see where it is needed. */ pthread_handler_t send_one_query(void *arg) { struct st_connection *cn= (struct st_connection*)arg; mysql_thread_init(); VOID(mysql_send_query(&cn->mysql, cn->cur_query, cn->cur_query_len)); mysql_thread_end(); pthread_mutex_lock(&cn->mutex); cn->query_done= 1; VOID(pthread_cond_signal(&cn->cond)); pthread_mutex_unlock(&cn->mutex); pthread_exit(0); return 0; } static int do_send_query(struct st_connection *cn, const char *q, int q_len, int flags) { pthread_t tid; if (flags & QUERY_REAP_FLAG) return mysql_send_query(&cn->mysql, q, q_len); if (pthread_mutex_init(&cn->mutex, NULL) || pthread_cond_init(&cn->cond, NULL)) die("Error in the thread library"); cn->cur_query= q; cn->cur_query_len= q_len; cn->query_done= 0; if (pthread_create(&tid, NULL, send_one_query, (void*)cn)) die("Cannot start new thread for query"); return 0; } #else /*EMBEDDED_LIBRARY*/ #define do_send_query(cn,q,q_len,flags) mysql_send_query(&cn->mysql, q, q_len) #endif /*EMBEDDED_LIBRARY*/ void do_eval(DYNAMIC_STRING *query_eval, const char *query, const char *query_end, my_bool pass_through_escape_chars) Loading Loading @@ -4506,7 +4561,6 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql) } /* Run query using MySQL C API Loading @@ -4523,11 +4577,12 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql) error - function will not return */ void run_query_normal(MYSQL *mysql, struct st_command *command, void run_query_normal(struct st_connection *cn, struct st_command *command, int flags, char *query, int query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings) { MYSQL_RES *res= 0; MYSQL *mysql= &cn->mysql; int err= 0, counter= 0; DBUG_ENTER("run_query_normal"); DBUG_PRINT("enter",("flags: %d", flags)); Loading @@ -4538,14 +4593,26 @@ void run_query_normal(MYSQL *mysql, struct st_command *command, /* Send the query */ if (mysql_send_query(mysql, query, query_len)) if (do_send_query(cn, query, query_len, flags)) { handle_error(command, mysql_errno(mysql), mysql_error(mysql), mysql_sqlstate(mysql), ds); goto end; } } #ifdef EMBEDDED_LIBRARY /* Here we handle 'reap' command, so we need to check if the query's thread was finished and probably wait */ else if (flags & QUERY_REAP_FLAG) { pthread_mutex_lock(&cn->mutex); while (!cn->query_done) pthread_cond_wait(&cn->cond, &cn->mutex); pthread_mutex_unlock(&cn->mutex); } #endif /*EMBEDDED_LIBRARY*/ if (!(flags & QUERY_REAP_FLAG)) DBUG_VOID_RETURN; Loading Loading @@ -5036,8 +5103,9 @@ int util_query(MYSQL* org_mysql, const char* query){ */ void run_query(MYSQL *mysql, struct st_command *command, int flags) void run_query(struct st_connection *cn, struct st_command *command, int flags) { MYSQL *mysql= &cn->mysql; DYNAMIC_STRING *ds; DYNAMIC_STRING ds_result; DYNAMIC_STRING ds_warnings; Loading Loading @@ -5194,7 +5262,7 @@ void run_query(MYSQL *mysql, struct st_command *command, int flags) match_re(&ps_re, query)) run_query_stmt(mysql, command, query, query_len, ds, &ds_warnings); else run_query_normal(mysql, command, flags, query, query_len, run_query_normal(cn, command, flags, query, query_len, ds, &ds_warnings); if (sp_created) Loading Loading @@ -5659,7 +5727,7 @@ int main(int argc, char **argv) strmake(command->require_file, save_file, sizeof(save_file)); save_file[0]= 0; } run_query(&cur_con->mysql, command, QUERY_REAP_FLAG|QUERY_SEND_FLAG); run_query(cur_con, command, QUERY_REAP_FLAG|QUERY_SEND_FLAG); display_result_vertically= old_display_result_vertically; command->last_argument= command->end; command_executed++; Loading Loading @@ -5690,7 +5758,7 @@ int main(int argc, char **argv) strmake(command->require_file, save_file, sizeof(save_file)); save_file[0]= 0; } run_query(&cur_con->mysql, command, flags); run_query(cur_con, command, flags); command_executed++; command->last_argument= command->end; break; Loading @@ -5716,7 +5784,7 @@ int main(int argc, char **argv) the query and read the result some time later when reap instruction is given on this connection. */ run_query(&cur_con->mysql, command, QUERY_SEND_FLAG); run_query(cur_con, command, QUERY_SEND_FLAG); command_executed++; command->last_argument= command->end; break; Loading
config/ac-macros/ha_ndbcluster.m4 +1 −1 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [ ndb_cxxflags_fix="" TEST_NDBCLUSTER="--ndbcluster" ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_builddir)/storage/ndb/include/ndbapi -I\$(top_builddir)/storage/ndb/include/mgmapi" ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include -I\$(top_srcdir)/storage/ndb/include/ndbapi -I\$(top_srcdir)/storage/ndb/include/mgmapi" ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a" ndbcluster_system_libs="" ndb_mgmclient_libs="\$(top_builddir)/storage/ndb/src/mgmclient/libndbmgmclient.la" Loading