-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Changes ### AS-IS MySQL, MariaDB 에서 지원되는 `INSERT .... SET` 쿼리의 경우 identifier 가 `{테이블명}.{컬럼명}` 형식으로 들어오는데, 기존 QSI 에서는 이 경우 컬럼명이 아니라 테이블명을 파싱하기 때문에 에러를 일으킵니다. 또한, default 값이 지정돼있으나 not null 제약조건이 있는 경우 insert 를 통해 null 을 대입하면 default 값이 할당되나, 기존 코드는 null 을 대입하는 것으로 보고 not null 에러를 일으킵니다. ### TO-BE identifier 를 적절히 파싱하고, default 있는 경우에 null 대입하면 적절히 default 대입하도록 수정합니다. 또한, 테스트 케이스 실행 결과를 검증하는 부분을 적절히 수정합니다. ## Note 이 이슈로 인한 NotNullConstraints 에러는 테이블을 가져오면서 각 컬럼의 IsNullable 정보를 적절히 가져오는 구현을 했던 경우에만 발생하는 에러이므로, IsNullable 정보를 적절히 가져오는 구현을 하지 않았던 경우에는 에러가 발생하지 않았습니다.
- Loading branch information
1 parent
4cd0608
commit 81b1754
Showing
5 changed files
with
38 additions
and
33 deletions.
There are no files selected for viewing
14 changes: 7 additions & 7 deletions
14
...BindParam_sql=INSERT INTO actor SELECT -, -, -, -_parameters=System.Object[].verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
| ||
+-------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------+------------+-----------+-------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------+------------+-----------+-------------+ | ||
| 1 | MORRIS | BABO | null | | ||
+-------------------------------------------------+ | ||
+-------------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------+------------+-----------+-------------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------+------------+-----------+-------------------+ | ||
| 1 | MORRIS | BABO | CURRENT_TIMESTAMP | | ||
+-------------------------------------------------------+ |
14 changes: 7 additions & 7 deletions
14
...tor SET actor.first_name = -, actor.last_name = -_parameters=System.Object[].verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
| ||
+-------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------+------------+-----------+-------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------+------------+-----------+-------------+ | ||
| default | MORRIS | BABO | default | | ||
+-------------------------------------------------+ | ||
+-------------------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------------+------------+-----------+-------------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------------+------------+-----------+-------------------+ | ||
| AUTO_INCREMENT | MORRIS | BABO | CURRENT_TIMESTAMP | | ||
+-------------------------------------------------------------+ |
14 changes: 7 additions & 7 deletions
14
.../MySqlTest.Test_Print_sql=INSERT INTO actor SELECT 1, 'MORRIS', 'BABO', null.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
| ||
+-------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------+------------+-----------+-------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------+------------+-----------+-------------+ | ||
| 1 | MORRIS | BABO | null | | ||
+-------------------------------------------------+ | ||
+-------------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------+------------+-----------+-------------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------+------------+-----------+-------------------+ | ||
| 1 | MORRIS | BABO | CURRENT_TIMESTAMP | | ||
+-------------------------------------------------------+ |
14 changes: 7 additions & 7 deletions
14
...=INSERT INTO actor SET actor.first_name = 'MORRIS', actor.last_name = 'BABO'.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
| ||
+-------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------+------------+-----------+-------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------+------------+-----------+-------------+ | ||
| default | MORRIS | BABO | default | | ||
+-------------------------------------------------+ | ||
+-------------------------------------------------------------+ | ||
| qsi_unit_tests.actor - INSERT | | ||
+----------------+------------+-----------+-------------------+ | ||
| actor_id | first_name | last_name | last_update | | ||
+----------------+------------+-----------+-------------------+ | ||
| AUTO_INCREMENT | MORRIS | BABO | CURRENT_TIMESTAMP | | ||
+-------------------------------------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters