setting port to MYSQL_PORT breaks my.cnf setting
MySQL database connector for Python programming
Brought to you by:
adustman
In _mysql.c, port is set to the default value of MYSQL_PORT. Problem is, if a value other than 0 is passed to mysql_real_connect, that value will override any value set in my.cnf or ~/.my.cnf, effectively meaning that non-standard port settings do not work via read_default_group in python.
The fix is merely to set port=0, which will cause mysql to use the compiled in port number as a default if it is not set elsewhere.
Logged In: YES
user_id=43580
Originator: YES
=== modified file 'trunk/MySQLdb/_mysql_connections.c'
--- trunk/MySQLdb/_mysql_connections.c 2007-02-11 04:37:29 +0000
+++ trunk/MySQLdb/_mysql_connections.c 2007-07-26 22:39:03 +0000
@@ -15,7 +15,7 @@
#endif
char host = NULL, user = NULL, passwd = NULL,
db = NULL, *unix_socket = NULL;
uint client_flag = 0;
static char *kwlist[] = { "host", "user", "passwd", "db", "port",
"unix_socket", "conv",
This got fixed way back in rev 625, about 3 years ago