@@ -59,29 +59,29 @@ void node_db_mysql::Connection::open() throw(node_db::Exception&) {
59
59
}
60
60
61
61
if (this ->compress ) {
62
- mysql_options (this ->connection , MYSQL_OPT_COMPRESS, 0 );
62
+ mysql_options (this ->connection , MYSQL_OPT_COMPRESS, ( const char *) 0 );
63
63
}
64
64
65
65
if (!this ->initCommand .empty ()) {
66
66
mysql_options (this ->connection , MYSQL_INIT_COMMAND, this ->initCommand .c_str ());
67
67
}
68
68
69
69
if (this ->readTimeout > 0 ) {
70
- mysql_options (this ->connection , MYSQL_OPT_READ_TIMEOUT, &this ->readTimeout );
70
+ mysql_options (this ->connection , MYSQL_OPT_READ_TIMEOUT, ( const char *) &this ->readTimeout );
71
71
}
72
72
73
73
#if MYSQL_VERSION_ID >= 50013
74
- mysql_options (this ->connection , MYSQL_OPT_RECONNECT, &this ->reconnect );
74
+ mysql_options (this ->connection , MYSQL_OPT_RECONNECT, ( const char *) &this ->reconnect );
75
75
#endif
76
76
77
- mysql_options (this ->connection , MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &this ->sslVerifyServer );
77
+ mysql_options (this ->connection , MYSQL_OPT_SSL_VERIFY_SERVER_CERT, ( const char *) &this ->sslVerifyServer );
78
78
79
79
if (this ->timeout > 0 ) {
80
- mysql_options (this ->connection , MYSQL_OPT_CONNECT_TIMEOUT, &this ->timeout );
80
+ mysql_options (this ->connection , MYSQL_OPT_CONNECT_TIMEOUT, ( const char *) &this ->timeout );
81
81
}
82
82
83
83
if (this ->writeTimeout > 0 ) {
84
- mysql_options (this ->connection , MYSQL_OPT_WRITE_TIMEOUT, &this ->writeTimeout );
84
+ mysql_options (this ->connection , MYSQL_OPT_WRITE_TIMEOUT, ( const char *) &this ->writeTimeout );
85
85
}
86
86
87
87
this ->opened = mysql_real_connect (
@@ -96,7 +96,7 @@ void node_db_mysql::Connection::open() throw(node_db::Exception&) {
96
96
97
97
#if MYSQL_VERSION_ID >= 50013 && MYSQL_VERSION_ID < 50019
98
98
// MySQL incorrectly resets the MYSQL_OPT_RECONNECT option to its default value before MySQL 5.0.19
99
- mysql_options (this ->connection , MYSQL_OPT_RECONNECT, &this ->reconnect );
99
+ mysql_options (this ->connection , MYSQL_OPT_RECONNECT, ( const char *) &this ->reconnect );
100
100
#endif
101
101
102
102
if (!this ->opened ) {
0 commit comments