diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2019-04-17 11:47:09 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2019-04-17 11:47:09 +0200 |
| commit | 913b56e34edc7e3025feea4744dbd762774805c3 (patch) | |
| tree | 7acdd91b30d17f023ca57d1c9383ced6118f45be | |
| parent | 5076be029aba75d72aa52ab3da9f81e6aaf04cc1 (diff) | |
| download | sqlparse-913b56e34edc7e3025feea4744dbd762774805c3.tar.gz | |
Update changelog and authors and add regression test for #485.
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | CHANGELOG | 5 | ||||
| -rw-r--r-- | tests/test_regressions.py | 10 |
3 files changed, 16 insertions, 0 deletions
@@ -60,4 +60,5 @@ Alphabetical list of contributors: * Ville Skyttä <ville.skytta@iki.fi> * vthriller <farreva232@yandex.ru> * wayne.wuw <wayne.wuw@alibaba-inc.com> +* William Ivanski <william.ivanski@gmail.com> * Yago Riveiro <yago.riveiro@gmail.com> @@ -5,6 +5,11 @@ Enhancements * Add HQL keywords (pr475, by matwalk). +Bug Fixes + +* Fix splitting of SQL with multiple statements inside + parentheses (issue485, pr486 by win39). + Release 0.3.0 (Mar 11, 2019) ---------------------------- diff --git a/tests/test_regressions.py b/tests/test_regressions.py index 8b2cb48..ce8c41f 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -390,3 +390,13 @@ def test_issue484_comments_and_newlines(): ' myId TINYINT NOT NULL,', ' myName VARCHAR2(100) NOT NULL', ')'])) + + +def test_issue485_split_multi(): + p_sql = '''CREATE OR REPLACE RULE ruled_tab_2rules AS ON INSERT +TO public.ruled_tab +DO instead ( +select 1; +select 2; +);''' + assert len(sqlparse.split(p_sql)) == 1 |
