File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,9 @@ void MySQL_Connection::init(ConnectOptionsMap & properties)
232
232
if (it != properties.end ())
233
233
{
234
234
if ((p_s = boost::get< sql::SQLString >(&it->second ))) {
235
-
236
- parseUri (*p_s, uri);
235
+ /* Parsing uri prior to processing all parameters, so indivudually
236
+ specified parameters precede over those in the uri */
237
+ parseUri (*p_s, uri);
237
238
} else {
238
239
throw sql::InvalidArgumentException (" No string value passed for hostName" );
239
240
}
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ void MySQL_Uri::setPipe(const sql::SQLString &p)
115
115
116
116
117
117
/* {{{ MySQL_Uri::setPort() -I- */
118
- void MySQL_Uri::setPort (int p)
118
+ void MySQL_Uri::setPort (unsigned int p)
119
119
{
120
120
setProtocol (NativeAPI::PROTOCOL_TCP);
121
121
port= p;
@@ -131,6 +131,10 @@ bool tcpProtocol(MySQL_Uri& uri)
131
131
132
132
133
133
/* {{{ Parse_Uri() -I- */
134
+ /* URI formats tcp://[host]:port/schema
135
+ unix://socket
136
+ pipe://named_pipe
137
+ */
134
138
bool parseUri (const sql::SQLString & str, MySQL_Uri& uri)
135
139
{
136
140
if (!str.compare (0 , sizeof (MYURI_SOCKET_PREFIX) - 1 , MYURI_SOCKET_PREFIX))
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class MySQL_Uri
55
55
void setHost (const sql::SQLString &h);
56
56
void setSocket (const sql::SQLString &s);
57
57
void setPipe (const sql::SQLString &p);
58
- void setPort (int p);
58
+ void setPort (unsigned int p);
59
59
inline void setSchema (const sql::SQLString &s) {schema= s.c_str ();}
60
60
61
61
inline void setProtocol (NativeAPI::Protocol_Type p){protocol= p;}
You can’t perform that action at this time.
0 commit comments