File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1339,6 +1339,14 @@ int main(int argc, char **argv) {
13391339 char *query = NULL ;
13401340 char *sqlparse_path = strdup (" /usr/local/sqlparser" );
13411341 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+
13421350 ConnectionOptionsInit (&options);
13431351 context = g_option_context_new (" sqladvisor" );
13441352 g_option_context_add_main_entries (context, entries, NULL );
@@ -1363,13 +1371,6 @@ int main(int argc, char **argv) {
13631371 }
13641372 }
13651373
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-
13731374 if (options.username == NULL || options.password == NULL
13741375 || options.host == NULL || options.dbname == NULL
13751376 || options.query [0 ] == NULL ) {
You can’t perform that action at this time.
0 commit comments