diff options
author | unknown <monty@mashka.mysql.fi> | 2003-04-07 21:36:45 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-04-07 21:36:45 +0300 |
commit | 7f922eeae37fa3300556281ebd587ab72541bd32 (patch) | |
tree | d37a2ce270b481b6ab98033d7cfcbe509d0b85df /sql/mini_client.cc | |
parent | cd30004b0da611f7a29f3e003d26cfd08473f268 (diff) | |
download | mariadb-git-7f922eeae37fa3300556281ebd587ab72541bd32.tar.gz |
Changed innobase_flush_log_at_trx_commit to be 1 as default
Fixed problem with not freed thr_alarm() on slave connect
mysql-test/t/rpl_alter.test:
Changed name of created test database
sql/ha_innobase.cc:
Changed innobase_flush_log_at_trx_commit to be 1 as default
sql/mini_client.cc:
Fixed problem with not freed thr_alarm()
sql/mysqld.cc:
Allocate some extra thr_alarm slots just to be safe
sql/slave.cc:
Simple code cleanup
Diffstat (limited to 'sql/mini_client.cc')
-rw-r--r-- | sql/mini_client.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/mini_client.cc b/sql/mini_client.cc index 453f27822d9..2c74eb96bf9 100644 --- a/sql/mini_client.cc +++ b/sql/mini_client.cc @@ -515,8 +515,6 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user, host ? host : "(Null)", db ? db : "(Null)", user ? user : "(Null)")); - thr_alarm_init(&alarmed); - thr_alarm(&alarmed,(uint) net_read_timeout,&alarm_buff); bzero((char*) &mysql->options,sizeof(mysql->options)); net->vio = 0; /* If something goes wrong */ @@ -598,7 +596,11 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user, host=LOCAL_HOST; sprintf(host_info=buff,ER(CR_TCP_CONNECTION),host); DBUG_PRINT("info",("Server name: '%s'. TCP sock: %d", host,port)); - if ((sock = socket(AF_INET,SOCK_STREAM,0)) == SOCKET_ERROR) + thr_alarm_init(&alarmed); + thr_alarm(&alarmed, net_read_timeout, &alarm_buff); + sock = (my_socket) socket(AF_INET,SOCK_STREAM,0); + thr_end_alarm(&alarmed); + if (sock == SOCKET_ERROR) { net->last_errno=CR_IPSOCK_ERROR; sprintf(net->last_error,ER(net->last_errno),socket_errno); @@ -641,12 +643,8 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user, socket_errno,host)); net->last_errno= CR_CONN_HOST_ERROR; sprintf(net->last_error ,ER(CR_CONN_HOST_ERROR), host, socket_errno); - if (thr_alarm_in_use(&alarmed)) - thr_end_alarm(&alarmed); goto error; } - if (thr_alarm_in_use(&alarmed)) - thr_end_alarm(&alarmed); } if (!net->vio || my_net_init(net, net->vio)) |