diff --git a/scripts/reduce_sql.py b/scripts/reduce_sql.py index 774095b..354738a 100644 --- a/scripts/reduce_sql.py +++ b/scripts/reduce_sql.py @@ -220,9 +220,10 @@ def reduce_multi_statement(sql_queries, local_shell, local_data_load, max_time=3 print(f"testing if just last statement of multi statement creates the error") (stdout, stderr, returncode) = run_shell_command(local_shell, local_data_load + last_statement) expected_error = sanitize_error(stderr).strip() - if len(expected_error) > 0: + if fuzzer_helper.is_internal_error(stderr) and len(expected_error) > 0: # reduce just the last statement - return reduce(last_statement, local_data_load, local_shell, expected_error, max_time) + print(f"last statement produces error") + return reduce(last_statement, local_data_load, local_shell, expected_error, max_time) queries = reduce_query_log(reducer.statements, local_shell, [local_data_load]) return "\n".join(queries) diff --git a/scripts/run_fuzzer.py b/scripts/run_fuzzer.py index 387764d..c773ed8 100644 --- a/scripts/run_fuzzer.py +++ b/scripts/run_fuzzer.py @@ -196,7 +196,7 @@ def run_shell_command(cmd): # reduce_multi_statement checks just the last statement first as a heuristic to see if # only the last statement causes the error. required_queries = reduce_sql.reduce_multi_statement(all_queries, shell, load_script) -cmd = load_script + '\n' + '\n'.join(required_queries) +cmd = load_script + '\n' + required_queries # get a new error message. (stdout, stderr, returncode) = run_shell_command(cmd)