@@ -137,67 +137,98 @@ function setoptions!(mysql;
137
137
)
138
138
if init_command != = nothing
139
139
API. setoption (mysql, API. MYSQL_INIT_COMMAND, init_command)
140
- elseif connect_timeout != = nothing
140
+ end
141
+ if connect_timeout != = nothing
141
142
API. setoption (mysql, API. MYSQL_OPT_CONNECT_TIMEOUT, connect_timeout)
142
- elseif reconnect != = nothing
143
+ end
144
+ if reconnect != = nothing
143
145
API. setoption (mysql, API. MYSQL_OPT_RECONNECT, reconnect)
144
- elseif read_timeout != = nothing
146
+ end
147
+ if read_timeout != = nothing
145
148
API. setoption (mysql, API. MYSQL_OPT_READ_TIMEOUT, read_timeout)
146
- elseif write_timeout != = nothing
149
+ end
150
+ if write_timeout != = nothing
147
151
API. setoption (mysql, API. MYSQL_OPT_WRITE_TIMEOUT, write_timeout)
148
- elseif data_truncation != = nothing
152
+ end
153
+ if data_truncation != = nothing
149
154
API. setoption (mysql, API. MYSQL_REPORT_DATA_TRUNCATION, data_truncation)
150
- elseif charset_dir != = nothing
155
+ end
156
+ if charset_dir != = nothing
151
157
API. setoption (mysql, API. MYSQL_SET_CHARSET_DIR, charset_dir)
152
- elseif charset_name != = nothing
158
+ end
159
+ if charset_name != = nothing
153
160
API. setoption (mysql, API. MYSQL_SET_CHARSET_NAME, charset_name)
154
- elseif bind != = nothing
161
+ end
162
+ if bind != = nothing
155
163
API. setoption (mysql, API. MYSQL_OPT_BIND, bind)
156
- elseif max_allowed_packet != = nothing
164
+ end
165
+ if max_allowed_packet != = nothing
157
166
API. setoption (mysql, API. MYSQL_OPT_MAX_ALLOWED_PACKET, max_allowed_packet)
158
- elseif net_buffer_length != = nothing
167
+ end
168
+ if net_buffer_length != = nothing
159
169
API. setoption (mysql, API. MYSQL_OPT_NET_BUFFER_LENGTH, net_buffer_length)
160
- elseif named_pipe != = nothing
170
+ end
171
+ if named_pipe != = nothing
161
172
API. setoption (mysql, API. MYSQL_OPT_NAMED_PIPE, named_pipe)
162
- elseif protocol != = nothing
173
+ end
174
+ if protocol != = nothing
163
175
API. setoption (mysql, API. MYSQL_OPT_PROTOCOL, protocol)
164
- elseif ssl_key != = nothing
176
+ end
177
+ if ssl_key != = nothing
165
178
API. setoption (mysql, API. MYSQL_OPT_SSL_KEY, ssl_key)
166
- elseif ssl_cert != = nothing
179
+ end
180
+ if ssl_cert != = nothing
167
181
API. setoption (mysql, API. MYSQL_OPT_SSL_CERT, ssl_cert)
168
- elseif ssl_ca != = nothing
182
+ end
183
+ if ssl_ca != = nothing
169
184
API. setoption (mysql, API. MYSQL_OPT_SSL_CA, ssl_ca)
170
- elseif ssl_capath != = nothing
185
+ end
186
+ if ssl_capath != = nothing
171
187
API. setoption (mysql, API. MYSQL_OPT_SSL_CAPATH, ssl_capath)
172
- elseif ssl_cipher != = nothing
188
+ end
189
+ if ssl_cipher != = nothing
173
190
API. setoption (mysql, API. MYSQL_OPT_SSL_CIPHER, ssl_cipher)
174
- elseif ssl_crl != = nothing
191
+ end
192
+ if ssl_crl != = nothing
175
193
API. setoption (mysql, API. MYSQL_OPT_SSL_CRL, ssl_crl)
176
- elseif ssl_crlpath != = nothing
194
+ end
195
+ if ssl_crlpath != = nothing
177
196
API. setoption (mysql, API. MYSQL_OPT_SSL_CRLPATH, ssl_crlpath)
178
- elseif passphrase != = nothing
197
+ end
198
+ if passphrase != = nothing
179
199
API. setoption (mysql, API. MARIADB_OPT_TLS_PASSPHRASE, passphrase)
180
- elseif ssl_verify_server_cert != = nothing
200
+ end
201
+ if ssl_verify_server_cert != = nothing
181
202
API. setoption (mysql, API. MYSQL_OPT_SSL_VERIFY_SERVER_CERT, ssl_verify_server_cert)
182
- elseif ssl_enforce != = nothing
203
+ end
204
+ if ssl_enforce != = nothing
183
205
API. setoption (mysql, API. MYSQL_OPT_SSL_ENFORCE, ssl_enforce)
184
- elseif default_auth != = nothing
206
+ end
207
+ if default_auth != = nothing
185
208
API. setoption (mysql, API. MYSQL_DEFAULT_AUTH, default_auth)
186
- elseif connection_handler != = nothing
209
+ end
210
+ if connection_handler != = nothing
187
211
API. setoption (mysql, API. MARIADB_OPT_CONNECTION_HANDLER, connection_handler)
188
- elseif plugin_dir != = nothing
212
+ end
213
+ if plugin_dir != = nothing
189
214
API. setoption (mysql, API. MYSQL_PLUGIN_DIR, plugin_dir)
190
- elseif secure_auth != = nothing
215
+ end
216
+ if secure_auth != = nothing
191
217
API. setoption (mysql, API. MYSQL_SECURE_AUTH, secure_auth)
192
- elseif server_public_key != = nothing
218
+ end
219
+ if server_public_key != = nothing
193
220
API. setoption (mysql, API. MYSQL_SERVER_PUBLIC_KEY, server_public_key)
194
- elseif read_default_file != = nothing && read_default_file
221
+ end
222
+ if read_default_file != = nothing && read_default_file
195
223
API. setoption (mysql, API. MYSQL_READ_DEFAULT_FILE, C_NULL )
196
- elseif option_file != = nothing
224
+ end
225
+ if option_file != = nothing
197
226
API. setoption (mysql, API. MYSQL_READ_DEFAULT_FILE, option_file)
198
- elseif read_default_group != = nothing && read_default_group
227
+ end
228
+ if read_default_group != = nothing && read_default_group
199
229
API. setoption (mysql, API. MYSQL_READ_DEFAULT_GROUP, C_NULL )
200
- elseif option_group != = nothing
230
+ end
231
+ if option_group != = nothing
201
232
API. setoption (mysql, API. MYSQL_READ_DEFAULT_GROUP, option_group)
202
233
end
203
234
return
0 commit comments