diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-10-23 13:28:03 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-10-23 13:28:03 -0600 |
commit | 8fc78e08b0e68f82121b0bba8d930bc5ec57a29f (patch) | |
tree | c5c654aca3970830687c68cb22289835e1719233 /libmysql | |
parent | 74f49f9f34b7a4cc1b87aa1cb657b72f8c6c856e (diff) | |
download | mariadb-git-8fc78e08b0e68f82121b0bba8d930bc5ec57a29f.tar.gz |
cleanup
removal of duplicate code in mf_iocache.cc
work on failsafe replication
work on SEQ_READ_APPEND io cache
include/my_sys.h:
updates for SEQ_READ_APPEND
libmysql/Makefile.am:
fix for mysys/mf_iocache.c
libmysql/libmysql.c:
updates for new format of SHOW SLAVE HOSTS
mysql-test/r/rpl000001.result:
test replication of LOAD DATA LOCAL INFILE
mysql-test/r/rpl000002.result:
updated test result
mysql-test/t/rpl000001.test:
test LOAD DATA LOCAL INFILE
mysys/mf_iocache.c:
cleanup to remove duplicate functionality
some work on SEQ_READ_APPEND
sql/mf_iocache.cc:
cleanup to remove duplicate functionality
sql/repl_failsafe.cc:
more work on failsafe replication
sql/repl_failsafe.h:
more work on failsafe replication
sql/slave.cc:
cleanup
more work on failsafe replication
sql/sql_load.cc:
fixed bug on replicating empty file loads
got LOAD DATA LOCAL INFILE to work again, and to be replicated
sql/sql_repl.cc:
cleanup
more work on failsafe replication
sql/sql_repl.h:
more work on failsafe replication
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/Makefile.am | 2 | ||||
-rw-r--r-- | libmysql/libmysql.c | 18 |
2 files changed, 14 insertions, 6 deletions
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index 050cf2041d3..eb9cf3b78ff 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -18,7 +18,7 @@ # This file is public domain and comes with NO WARRANTY of any kind target = libmysqlclient.la -target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID +target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID -DMYSQL_CLIENT LIBS = @CLIENT_LIBS@ INCLUDES = -I$(srcdir)/../include -I../include \ -I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 2255dcb83bd..28f643ab497 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1147,6 +1147,8 @@ static inline int get_slaves_from_master(MYSQL* mysql) MYSQL_ROW row; int error = 1; int has_auth_info; + int port_ind; + if (!mysql->net.vio && !mysql_real_connect(mysql,0,0,0,0,0,0,0)) { expand_error(mysql, CR_PROBE_MASTER_CONNECT); @@ -1162,8 +1164,14 @@ static inline int get_slaves_from_master(MYSQL* mysql) switch (mysql_num_fields(res)) { - case 3: has_auth_info = 0; break; - case 5: has_auth_info = 1; break; + case 5: + has_auth_info = 0; + port_ind=2; + break; + case 7: + has_auth_info = 1; + port_ind=4; + break; default: goto err; } @@ -1175,8 +1183,8 @@ static inline int get_slaves_from_master(MYSQL* mysql) if (has_auth_info) { - tmp_user = row[3]; - tmp_pass = row[4]; + tmp_user = row[2]; + tmp_pass = row[3]; } else { @@ -1184,7 +1192,7 @@ static inline int get_slaves_from_master(MYSQL* mysql) tmp_pass = mysql->passwd; } - if (!(slave = spawn_init(mysql, row[1], atoi(row[2]), + if (!(slave = spawn_init(mysql, row[1], atoi(row[port_ind]), tmp_user, tmp_pass))) goto err; |