Loading libmysqld/Makefile.am +5 −2 Original line number Diff line number Diff line Loading @@ -136,14 +136,17 @@ else then \ $(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \ else \ current_dir=`pwd`; \ rm -rf tmp; mkdir tmp; \ (for arc in ./libmysqld_int.a $(INC_LIB); do \ arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \ artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \ for F in `$(AR) t $$arc`; do \ if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \ mkdir $$artmp; cd $$artmp; $(AR) x ../../$$arc; \ cd ../..; ls $$artmp/*; \ mkdir $$artmp; cd $$artmp > /dev/null; \ $(AR) x ../../$$arc; \ cd $$current_dir > /dev/null; \ ls $$artmp/*; \ continue 2; fi; done; \ done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \ $(RANLIB) libmysqld.a ; \ Loading mysql-test/mysql-test-run.pl +4 −4 Original line number Diff line number Diff line Loading @@ -532,10 +532,10 @@ sub command_line_setup () { my $opt_master_myport= 9306; my $opt_slave_myport= 9308; $opt_ndbcluster_port= 9350; $opt_ndbcluster_port_slave= 9358; my $im_port= 9310; my $im_mysqld1_port= 9312; $opt_ndbcluster_port= 9310; $opt_ndbcluster_port_slave= 9311; my $im_port= 9312; my $im_mysqld1_port= 9313; my $im_mysqld2_port= 9314; # Loading mysql-test/mysql-test-run.sh +7 −11 Original line number Diff line number Diff line Loading @@ -7,17 +7,11 @@ # List of failed cases (--force) backported from 4.1 by Joerg # :-) echo "##################################################"; echo "This script is deprecated and will soon be removed"; echo "Use mysql-test-run.pl instead"; echo "Now sleeping 20 seconds..."; echo "##################################################"; sleep 20; echo "continuing"; echo; #echo "##################################################"; #echo "This script is deprecated and will soon be removed"; #echo "Use mysql-test-run.pl instead"; #echo "##################################################"; #echo #++ # Access Definitions Loading Loading @@ -250,6 +244,7 @@ MASTER_MYPORT=9306 SLAVE_RUNNING=0 SLAVE_MYHOST=127.0.0.1 SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log NDBCLUSTER_PORT=9350 NDBCLUSTER_PORT_SLAVE=9358 Loading Loading @@ -1196,6 +1191,7 @@ abort_if_failed() launch_in_background() { shift echo $@ | /bin/sh >> $CUR_MYERR 2>&1 & sleep 2 #hack return Loading storage/example/ha_example.cc +27 −11 Original line number Diff line number Diff line Loading @@ -74,6 +74,8 @@ static handler* example_create_handler(TABLE_SHARE *table); static int example_init_func(); static bool example_init_func_for_handlerton(); static int example_panic(enum ha_panic_function flag); handlerton example_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, Loading @@ -81,7 +83,7 @@ handlerton example_hton= { SHOW_OPTION_YES, "Example storage engine", DB_TYPE_EXAMPLE_DB, (bool (*)()) example_init_func, example_init_func_for_handlerton, 0, /* slot */ 0, /* savepoint size. */ NULL, /* close_connection */ Loading @@ -99,7 +101,7 @@ handlerton example_hton= { NULL, /* close_cursor_read_view */ example_create_handler, /* Create a new handler */ NULL, /* Drop a database */ NULL, /* Panic call */ example_panic, /* Panic call */ NULL, /* Start Consistent Snapshot */ NULL, /* Flush logs */ NULL, /* Show status */ Loading @@ -107,7 +109,10 @@ handlerton example_hton= { NULL, /* Alter table flags */ NULL, /* Alter tablespace */ NULL, /* Fill Files table */ HTON_CAN_RECREATE HTON_CAN_RECREATE, NULL, NULL, NULL, }; /* Variables for example share methods */ Loading @@ -126,32 +131,43 @@ static byte* example_get_key(EXAMPLE_SHARE *share,uint *length, return (byte*) share->table_name; } static int example_init_func() { DBUG_ENTER("example_init_func"); if (!example_init) { example_init++; example_init= 1; VOID(pthread_mutex_init(&example_mutex,MY_MUTEX_INIT_FAST)); (void) hash_init(&example_open_tables,system_charset_info,32,0,0, (hash_get_key) example_get_key,0,0); } return 0; DBUG_RETURN(0); } static int example_done_func() { int error= 0; DBUG_ENTER("example_done_func"); if (example_init) { example_init= 0; if (example_open_tables.records) { return 1; } error= 1; hash_free(&example_open_tables); pthread_mutex_destroy(&example_mutex); example_init--; } return 0; DBUG_RETURN(0); } static bool example_init_func_for_handlerton() { return example_init_func(); } static int example_panic(enum ha_panic_function flag) { return example_done_func(); } Loading storage/ndb/src/mgmapi/mgmapi.cpp +15 −9 Original line number Diff line number Diff line Loading @@ -138,6 +138,12 @@ setError(NdbMgmHandle h, int error, int error_line, const char * msg, ...){ return ret; \ } #define DBUG_CHECK_REPLY(reply, ret) \ if (reply == NULL) { \ SET_ERROR(handle, NDB_MGM_ILLEGAL_SERVER_REPLY, ""); \ DBUG_RETURN(ret); \ } /***************************************************************************** * Handles *****************************************************************************/ Loading Loading @@ -2171,9 +2177,9 @@ ndb_mgm_set_connection_int_parameter(NdbMgmHandle handle, int param, int value, struct ndb_mgm_reply* mgmreply){ DBUG_ENTER("ndb_mgm_set_connection_int_parameter"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_set_connection_int_parameter"); Properties args; args.put("node1", node1); Loading @@ -2190,7 +2196,7 @@ ndb_mgm_set_connection_int_parameter(NdbMgmHandle handle, const Properties *prop; prop= ndb_mgm_call(handle, reply, "set connection parameter", &args); CHECK_REPLY(prop, -1); DBUG_CHECK_REPLY(prop, -1); int res= -1; do { Loading @@ -2214,9 +2220,9 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle, int param, int *value, struct ndb_mgm_reply* mgmreply){ DBUG_ENTER("ndb_mgm_get_connection_int_parameter"); CHECK_HANDLE(handle, -1); CHECK_CONNECTED(handle, -2); DBUG_ENTER("ndb_mgm_get_connection_int_parameter"); Properties args; args.put("node1", node1); Loading @@ -2232,7 +2238,7 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle, const Properties *prop; prop = ndb_mgm_call(handle, reply, "get connection parameter", &args); CHECK_REPLY(prop, -3); DBUG_CHECK_REPLY(prop, -3); int res= -1; do { Loading Loading @@ -2280,9 +2286,9 @@ ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle) { Uint32 nodeid=0; DBUG_ENTER("ndb_mgm_get_mgmd_nodeid"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_get_mgmd_nodeid"); Properties args; Loading @@ -2294,7 +2300,7 @@ ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle) const Properties *prop; prop = ndb_mgm_call(handle, reply, "get mgmd nodeid", &args); CHECK_REPLY(prop, 0); DBUG_CHECK_REPLY(prop, 0); if(!prop->get("nodeid",&nodeid)){ fprintf(handle->errstream, "Unable to get value\n"); Loading @@ -2308,9 +2314,9 @@ ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle) extern "C" int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length) { DBUG_ENTER("ndb_mgm_report_event"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_report_event"); Properties args; args.put("length", length); Loading @@ -2329,7 +2335,7 @@ int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length) const Properties *prop; prop = ndb_mgm_call(handle, reply, "report event", &args); CHECK_REPLY(prop, -1); DBUG_CHECK_REPLY(prop, -1); DBUG_RETURN(0); } Loading @@ -2337,9 +2343,9 @@ int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length) extern "C" int ndb_mgm_end_session(NdbMgmHandle handle) { DBUG_ENTER("ndb_mgm_end_session"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_end_session"); SocketOutputStream s_output(handle->socket); s_output.println("end session"); Loading Loading
libmysqld/Makefile.am +5 −2 Original line number Diff line number Diff line Loading @@ -136,14 +136,17 @@ else then \ $(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \ else \ current_dir=`pwd`; \ rm -rf tmp; mkdir tmp; \ (for arc in ./libmysqld_int.a $(INC_LIB); do \ arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \ artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \ for F in `$(AR) t $$arc`; do \ if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \ mkdir $$artmp; cd $$artmp; $(AR) x ../../$$arc; \ cd ../..; ls $$artmp/*; \ mkdir $$artmp; cd $$artmp > /dev/null; \ $(AR) x ../../$$arc; \ cd $$current_dir > /dev/null; \ ls $$artmp/*; \ continue 2; fi; done; \ done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \ $(RANLIB) libmysqld.a ; \ Loading
mysql-test/mysql-test-run.pl +4 −4 Original line number Diff line number Diff line Loading @@ -532,10 +532,10 @@ sub command_line_setup () { my $opt_master_myport= 9306; my $opt_slave_myport= 9308; $opt_ndbcluster_port= 9350; $opt_ndbcluster_port_slave= 9358; my $im_port= 9310; my $im_mysqld1_port= 9312; $opt_ndbcluster_port= 9310; $opt_ndbcluster_port_slave= 9311; my $im_port= 9312; my $im_mysqld1_port= 9313; my $im_mysqld2_port= 9314; # Loading
mysql-test/mysql-test-run.sh +7 −11 Original line number Diff line number Diff line Loading @@ -7,17 +7,11 @@ # List of failed cases (--force) backported from 4.1 by Joerg # :-) echo "##################################################"; echo "This script is deprecated and will soon be removed"; echo "Use mysql-test-run.pl instead"; echo "Now sleeping 20 seconds..."; echo "##################################################"; sleep 20; echo "continuing"; echo; #echo "##################################################"; #echo "This script is deprecated and will soon be removed"; #echo "Use mysql-test-run.pl instead"; #echo "##################################################"; #echo #++ # Access Definitions Loading Loading @@ -250,6 +244,7 @@ MASTER_MYPORT=9306 SLAVE_RUNNING=0 SLAVE_MYHOST=127.0.0.1 SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log NDBCLUSTER_PORT=9350 NDBCLUSTER_PORT_SLAVE=9358 Loading Loading @@ -1196,6 +1191,7 @@ abort_if_failed() launch_in_background() { shift echo $@ | /bin/sh >> $CUR_MYERR 2>&1 & sleep 2 #hack return Loading
storage/example/ha_example.cc +27 −11 Original line number Diff line number Diff line Loading @@ -74,6 +74,8 @@ static handler* example_create_handler(TABLE_SHARE *table); static int example_init_func(); static bool example_init_func_for_handlerton(); static int example_panic(enum ha_panic_function flag); handlerton example_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, Loading @@ -81,7 +83,7 @@ handlerton example_hton= { SHOW_OPTION_YES, "Example storage engine", DB_TYPE_EXAMPLE_DB, (bool (*)()) example_init_func, example_init_func_for_handlerton, 0, /* slot */ 0, /* savepoint size. */ NULL, /* close_connection */ Loading @@ -99,7 +101,7 @@ handlerton example_hton= { NULL, /* close_cursor_read_view */ example_create_handler, /* Create a new handler */ NULL, /* Drop a database */ NULL, /* Panic call */ example_panic, /* Panic call */ NULL, /* Start Consistent Snapshot */ NULL, /* Flush logs */ NULL, /* Show status */ Loading @@ -107,7 +109,10 @@ handlerton example_hton= { NULL, /* Alter table flags */ NULL, /* Alter tablespace */ NULL, /* Fill Files table */ HTON_CAN_RECREATE HTON_CAN_RECREATE, NULL, NULL, NULL, }; /* Variables for example share methods */ Loading @@ -126,32 +131,43 @@ static byte* example_get_key(EXAMPLE_SHARE *share,uint *length, return (byte*) share->table_name; } static int example_init_func() { DBUG_ENTER("example_init_func"); if (!example_init) { example_init++; example_init= 1; VOID(pthread_mutex_init(&example_mutex,MY_MUTEX_INIT_FAST)); (void) hash_init(&example_open_tables,system_charset_info,32,0,0, (hash_get_key) example_get_key,0,0); } return 0; DBUG_RETURN(0); } static int example_done_func() { int error= 0; DBUG_ENTER("example_done_func"); if (example_init) { example_init= 0; if (example_open_tables.records) { return 1; } error= 1; hash_free(&example_open_tables); pthread_mutex_destroy(&example_mutex); example_init--; } return 0; DBUG_RETURN(0); } static bool example_init_func_for_handlerton() { return example_init_func(); } static int example_panic(enum ha_panic_function flag) { return example_done_func(); } Loading
storage/ndb/src/mgmapi/mgmapi.cpp +15 −9 Original line number Diff line number Diff line Loading @@ -138,6 +138,12 @@ setError(NdbMgmHandle h, int error, int error_line, const char * msg, ...){ return ret; \ } #define DBUG_CHECK_REPLY(reply, ret) \ if (reply == NULL) { \ SET_ERROR(handle, NDB_MGM_ILLEGAL_SERVER_REPLY, ""); \ DBUG_RETURN(ret); \ } /***************************************************************************** * Handles *****************************************************************************/ Loading Loading @@ -2171,9 +2177,9 @@ ndb_mgm_set_connection_int_parameter(NdbMgmHandle handle, int param, int value, struct ndb_mgm_reply* mgmreply){ DBUG_ENTER("ndb_mgm_set_connection_int_parameter"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_set_connection_int_parameter"); Properties args; args.put("node1", node1); Loading @@ -2190,7 +2196,7 @@ ndb_mgm_set_connection_int_parameter(NdbMgmHandle handle, const Properties *prop; prop= ndb_mgm_call(handle, reply, "set connection parameter", &args); CHECK_REPLY(prop, -1); DBUG_CHECK_REPLY(prop, -1); int res= -1; do { Loading @@ -2214,9 +2220,9 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle, int param, int *value, struct ndb_mgm_reply* mgmreply){ DBUG_ENTER("ndb_mgm_get_connection_int_parameter"); CHECK_HANDLE(handle, -1); CHECK_CONNECTED(handle, -2); DBUG_ENTER("ndb_mgm_get_connection_int_parameter"); Properties args; args.put("node1", node1); Loading @@ -2232,7 +2238,7 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle, const Properties *prop; prop = ndb_mgm_call(handle, reply, "get connection parameter", &args); CHECK_REPLY(prop, -3); DBUG_CHECK_REPLY(prop, -3); int res= -1; do { Loading Loading @@ -2280,9 +2286,9 @@ ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle) { Uint32 nodeid=0; DBUG_ENTER("ndb_mgm_get_mgmd_nodeid"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_get_mgmd_nodeid"); Properties args; Loading @@ -2294,7 +2300,7 @@ ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle) const Properties *prop; prop = ndb_mgm_call(handle, reply, "get mgmd nodeid", &args); CHECK_REPLY(prop, 0); DBUG_CHECK_REPLY(prop, 0); if(!prop->get("nodeid",&nodeid)){ fprintf(handle->errstream, "Unable to get value\n"); Loading @@ -2308,9 +2314,9 @@ ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle) extern "C" int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length) { DBUG_ENTER("ndb_mgm_report_event"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_report_event"); Properties args; args.put("length", length); Loading @@ -2329,7 +2335,7 @@ int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length) const Properties *prop; prop = ndb_mgm_call(handle, reply, "report event", &args); CHECK_REPLY(prop, -1); DBUG_CHECK_REPLY(prop, -1); DBUG_RETURN(0); } Loading @@ -2337,9 +2343,9 @@ int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length) extern "C" int ndb_mgm_end_session(NdbMgmHandle handle) { DBUG_ENTER("ndb_mgm_end_session"); CHECK_HANDLE(handle, 0); CHECK_CONNECTED(handle, 0); DBUG_ENTER("ndb_mgm_end_session"); SocketOutputStream s_output(handle->socket); s_output.println("end session"); Loading