File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -1339,6 +1339,14 @@ int main(int argc, char **argv) {
1339
1339
char *query = NULL ;
1340
1340
char *sqlparse_path = strdup (" /usr/local/sqlparser" );
1341
1341
int i = 0 ;
1342
+
1343
+ if (mysqld_init (sqlparse_path)) {
1344
+ sql_print_error (" 加载sqlparser模块有错 \n " );
1345
+ if (sqlparse_path) free (sqlparse_path);
1346
+ return -1 ;
1347
+ }
1348
+ if (sqlparse_path) free (sqlparse_path);
1349
+
1342
1350
ConnectionOptionsInit (&options);
1343
1351
context = g_option_context_new (" sqladvisor" );
1344
1352
g_option_context_add_main_entries (context, entries, NULL );
@@ -1363,13 +1371,6 @@ int main(int argc, char **argv) {
1363
1371
}
1364
1372
}
1365
1373
1366
- if (mysqld_init (sqlparse_path)) {
1367
- sql_print_error (" 加载sqlparser模块有错 \n " );
1368
- if (sqlparse_path) free (sqlparse_path);
1369
- return -1 ;
1370
- }
1371
- if (sqlparse_path) free (sqlparse_path);
1372
-
1373
1374
if (options.username == NULL || options.password == NULL
1374
1375
|| options.host == NULL || options.dbname == NULL
1375
1376
|| options.query [0 ] == NULL ) {
You can’t perform that action at this time.
0 commit comments