Below is the list of changes that have just been committed into a local
5.1 repository of anozdrin. When anozdrin does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-03-17 13:39:56+03:00, anozdrin@quad. +1 -0
A patch for Bug#35329: connect does not set mysql_errno variable.
The problem was that 'connect' command didn't set mysql_errno
variable, thus the script was unable to determine whether connection
was opened or not.
The fix is to set this variable.
Test cases will be added in the scope of Bug33507
into connect.test file.
client/mysqltest.c@stripped, 2008-03-17 13:39:55+03:00, anozdrin@quad. +2 -0
Set 'mysql_errno' variable.
diff -Nrup a/client/mysqltest.c b/client/mysqltest.c
--- a/client/mysqltest.c 2008-02-26 19:26:40 +03:00
+++ b/client/mysqltest.c 2008-03-17 13:39:55 +03:00
@@ -4221,11 +4221,13 @@ int connect_n_handle_errors(struct st_co
if (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0,
CLIENT_MULTI_STATEMENTS))
{
+ var_set_errno(mysql_errno(con));
handle_error(command, mysql_errno(con), mysql_error(con),
mysql_sqlstate(con), ds);
return 0; /* Not connected */
}
+ var_set_errno(0);
handle_no_error(command);
return 1; /* Connected */
}
| Thread |
|---|
| • bk commit into 5.1 tree (anozdrin:1.2566) BUG#35329 | Alexander Nozdrin | 17 Mar |