summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2000-11-25 23:29:01 -0700
committerunknown <sasha@mysql.sashanet.com>2000-11-25 23:29:01 -0700
commitc3cc5856a5d9ee8fa3d01207613f961ae110b2cd (patch)
treea230abbd46e3341756e3e5629a69736b6a057239 /client
parent80db9fb3c95519383bbae73aa8cfc0773bf7c40f (diff)
downloadmariadb-git-c3cc5856a5d9ee8fa3d01207613f961ae110b2cd.tar.gz
Fixed temp tables to work with replication. It will not work if you stop the slave
while slave thread has temp tables - not hard to fix though, but it is time to go to bed added a new test case for temp table replication and Slave_open_temp_tables status variable. Misc fixes client/mysqltest.c: added disconnect command mysql-test/create-test-result: fixed bugs so it actually works mysql-test/t/include/master-slave.inc: establish alternate connections to master and slave sql/mysql_priv.h: Slave_open_temp_tables sql/mysqlbinlog.cc: fixed a bug in reading local binlogs sql/mysqld.cc: added Slave_open_temp_tables status variable sql/slave.cc: fixed freed memory reference in the error message sql/sql_class.cc: slave_proxy_id sql/sql_class.h: slave_proxy_id sql/sql_parse.cc: small optimization - reorder eval in && BitKeeper/etc/ignore: Added mysql-test/r/3.23/rpl000001.b.result.reject mysql-test/r/3.23/rpl000012.result.reject to the ignore list sql/sql_table.cc: added THD arg to rename_temporary_table sql/unireg.h: the table_cache_key is now 4 bytes longer
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 3d8b72c5ae4..dd024bb339b 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -78,6 +78,7 @@ struct query
};
static void die(const char* fmt, ...);
+int close_connection(struct query* q);
int hex_val(int c)
@@ -155,6 +156,30 @@ int select_connection(struct query* q)
return 1;
}
+int close_connection(struct query* q)
+{
+ char* p, *name;
+ struct connection *con;
+ p = (char*)q->q + q->first_word_len;
+ while(*p && isspace(*p)) p++;
+ if(!*p)
+ die("Missing connection name in connect\n");
+ name = p;
+ while(*p && !isspace(*p))
+ p++;
+ *p = 0;
+
+ for(con = cons; con < next_con; con++)
+ if(!strcmp(con->name, name))
+ {
+ mysql_close(&con->mysql);
+ return 0;
+ }
+
+ die("connection '%s' not found in connection pool", name);
+ return 1;
+}
+
/* this one now is a hack - we may want to improve in in the
future to handle quotes. For now we assume that anything that is not
@@ -851,6 +876,8 @@ int main(int argc, char** argv)
do_connect(&q);
else if(check_first_word(&q, "connection", 10))
select_connection(&q);
+ else if(check_first_word(&q, "disconnect", 10))
+ close_connection(&q);
else if(check_first_word(&q, "source", 6))
do_source(&q);
else if(check_first_word(&q, "sleep", 5))