Loading client/Makefile.am +2 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \ $(openssl_includes) LIBS = @CLIENT_LIBS@ DEPLIB= ../libmysql/libmysqlclient.la \ @ndb_mgmclient_libs@ DEPLIB= @ndb_mgmclient_libs@ \ ../libmysql/libmysqlclient.la LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB) bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen Loading client/mysqldump.c +18 −4 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ static struct my_option my_long_options[] = "any action on logs will happen at the exact moment of the dump." "Option automatically turns --lock-tables off.", (gptr*) &opt_master_data, (gptr*) &opt_master_data, 0, GET_UINT, REQUIRED_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0}, GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0}, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "", (gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0, GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, Loading Loading @@ -548,6 +548,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case '?': usage(); exit(0); case (int) OPT_MASTER_DATA: if (!argument) /* work like in old versions */ opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL; break; case (int) OPT_OPTIMIZE: extended_insert= opt_drop= opt_lock= quick= create_options= opt_disable_keys= lock_tables= opt_set_charset= 1; Loading Loading @@ -1680,7 +1684,7 @@ static void dumpTable(uint numFields, char *table) else if (opt_hex_blob && is_blob) { /* sakaik got the idea to to provide blob's in hex notation. */ unsigned char *ptr= row[i], *end= ptr+ lengths[i]; char *ptr= row[i], *end= ptr+ lengths[i]; fputs("0x", md_result_file); for (; ptr < end ; ptr++) fprintf(md_result_file, "%02X", *ptr); Loading Loading @@ -2046,8 +2050,18 @@ static int do_show_master_status(MYSQL *mysql_con) static int do_flush_tables_read_lock(MYSQL *mysql_con) { /* We do first a FLUSH TABLES. If a long update is running, the FLUSH TABLES will wait but will not stall the whole mysqld, and when the long update is done the FLUSH TABLES WITH READ LOCK will start and succeed quickly. So, FLUSH TABLES is to lower the probability of a stage where both mysqldump and most client connections are stalled. Of course, if a second long update starts between the two FLUSHes, we have that bad stall. */ return mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES WITH READ LOCK"); ( mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES") || mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES WITH READ LOCK") ); } Loading Loading @@ -2232,7 +2246,7 @@ int main(int argc, char **argv) } if (opt_master_data && do_show_master_status(sock)) goto err; if (opt_single_transaction && do_unlock_tables(sock)) // unlock but no commit! if (opt_single_transaction && do_unlock_tables(sock)) /* unlock but no commit! */ goto err; if (opt_alldbs) Loading mysql-test/r/binary.result +7 −0 Original line number Diff line number Diff line Loading @@ -134,3 +134,10 @@ select * from t1 where firstname='john' and firstname like binary 'John'; firstname lastname John Doe drop table t1; create table t1 (a binary); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` binary(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; mysql-test/t/binary.test +7 −0 Original line number Diff line number Diff line Loading @@ -80,3 +80,10 @@ select * from t1 where firstname='john' and firstname = binary 'john'; select * from t1 where firstname='John' and firstname like binary 'john'; select * from t1 where firstname='john' and firstname like binary 'John'; drop table t1; # # Bug #6552 CHAR column w/o length is legal, BINARY w/o length is not # create table t1 (a binary); show create table t1; drop table t1; ndb/src/common/mgmcommon/ConfigRetriever.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -238,7 +238,8 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32 char buf[255]; ndb_mgm_configuration_iterator * it; it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf, CFG_SECTION_NODE); it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf, CFG_SECTION_NODE); if(it == 0){ BaseString::snprintf(buf, 255, "Unable to create config iterator"); Loading Loading @@ -284,8 +285,14 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32 } if(_type != m_node_type){ BaseString::snprintf(buf, 255, "Supplied node type(%d) and config node type(%d) " " don't match", m_node_type, _type); const char *type_s, *alias_s, *type_s2, *alias_s2; alias_s= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)m_node_type, &type_s); alias_s2= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)_type, &type_s2); BaseString::snprintf(buf, 255, "This node type %s(%s) and config " "node type %s(%s) don't match for nodeid %d", alias_s, type_s, alias_s2, type_s2, nodeid); setError(CR_ERROR, buf); return false; } Loading Loading
client/Makefile.am +2 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \ $(openssl_includes) LIBS = @CLIENT_LIBS@ DEPLIB= ../libmysql/libmysqlclient.la \ @ndb_mgmclient_libs@ DEPLIB= @ndb_mgmclient_libs@ \ ../libmysql/libmysqlclient.la LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB) bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen Loading
client/mysqldump.c +18 −4 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ static struct my_option my_long_options[] = "any action on logs will happen at the exact moment of the dump." "Option automatically turns --lock-tables off.", (gptr*) &opt_master_data, (gptr*) &opt_master_data, 0, GET_UINT, REQUIRED_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0}, GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0}, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "", (gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0, GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, Loading Loading @@ -548,6 +548,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case '?': usage(); exit(0); case (int) OPT_MASTER_DATA: if (!argument) /* work like in old versions */ opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL; break; case (int) OPT_OPTIMIZE: extended_insert= opt_drop= opt_lock= quick= create_options= opt_disable_keys= lock_tables= opt_set_charset= 1; Loading Loading @@ -1680,7 +1684,7 @@ static void dumpTable(uint numFields, char *table) else if (opt_hex_blob && is_blob) { /* sakaik got the idea to to provide blob's in hex notation. */ unsigned char *ptr= row[i], *end= ptr+ lengths[i]; char *ptr= row[i], *end= ptr+ lengths[i]; fputs("0x", md_result_file); for (; ptr < end ; ptr++) fprintf(md_result_file, "%02X", *ptr); Loading Loading @@ -2046,8 +2050,18 @@ static int do_show_master_status(MYSQL *mysql_con) static int do_flush_tables_read_lock(MYSQL *mysql_con) { /* We do first a FLUSH TABLES. If a long update is running, the FLUSH TABLES will wait but will not stall the whole mysqld, and when the long update is done the FLUSH TABLES WITH READ LOCK will start and succeed quickly. So, FLUSH TABLES is to lower the probability of a stage where both mysqldump and most client connections are stalled. Of course, if a second long update starts between the two FLUSHes, we have that bad stall. */ return mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES WITH READ LOCK"); ( mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES") || mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES WITH READ LOCK") ); } Loading Loading @@ -2232,7 +2246,7 @@ int main(int argc, char **argv) } if (opt_master_data && do_show_master_status(sock)) goto err; if (opt_single_transaction && do_unlock_tables(sock)) // unlock but no commit! if (opt_single_transaction && do_unlock_tables(sock)) /* unlock but no commit! */ goto err; if (opt_alldbs) Loading
mysql-test/r/binary.result +7 −0 Original line number Diff line number Diff line Loading @@ -134,3 +134,10 @@ select * from t1 where firstname='john' and firstname like binary 'John'; firstname lastname John Doe drop table t1; create table t1 (a binary); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` binary(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1;
mysql-test/t/binary.test +7 −0 Original line number Diff line number Diff line Loading @@ -80,3 +80,10 @@ select * from t1 where firstname='john' and firstname = binary 'john'; select * from t1 where firstname='John' and firstname like binary 'john'; select * from t1 where firstname='john' and firstname like binary 'John'; drop table t1; # # Bug #6552 CHAR column w/o length is legal, BINARY w/o length is not # create table t1 (a binary); show create table t1; drop table t1;
ndb/src/common/mgmcommon/ConfigRetriever.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -238,7 +238,8 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32 char buf[255]; ndb_mgm_configuration_iterator * it; it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf, CFG_SECTION_NODE); it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf, CFG_SECTION_NODE); if(it == 0){ BaseString::snprintf(buf, 255, "Unable to create config iterator"); Loading Loading @@ -284,8 +285,14 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32 } if(_type != m_node_type){ BaseString::snprintf(buf, 255, "Supplied node type(%d) and config node type(%d) " " don't match", m_node_type, _type); const char *type_s, *alias_s, *type_s2, *alias_s2; alias_s= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)m_node_type, &type_s); alias_s2= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)_type, &type_s2); BaseString::snprintf(buf, 255, "This node type %s(%s) and config " "node type %s(%s) don't match for nodeid %d", alias_s, type_s, alias_s2, type_s2, nodeid); setError(CR_ERROR, buf); return false; } Loading