haetao commented on a change in pull request #3292: add SQL test case to moudle
sql-test and parse-test
URL:
https://github.com/apache/incubator-shardingsphere/pull/3292#discussion_r335496237
##########
File path: sharding-sql-test/src/main/resources/sql/sharding/dml/insert.xml
##########
@@ -48,4 +48,7 @@
<sql-case id="insert_with_null_value" value="INSERT INTO
t_null_value_test(col1) VALUES(null)" db-types="MySQL" />
<sql-case id="insert_with_blob_value" value="INSERT INTO
t_blob_value_test(col1) VALUES(_BINARY'This is a binary value.')"
db-types="MySQL" />
<sql-case id="insert_with_function" value="INSERT INTO
t_order(current_date, order_id, user_id) VALUES (curdate(), ?, ?)"
db-types="MySQL" />
+ <sql-case id="insert_duplicate_key_update_with_equation_common"
value="INSERT INTO emp(id,age,salary) VALUES (?,?,?) ON DUPLICATE KEY UPDATE
salary = salary+1" db-types="MySQL"/>
+ <sql-case id="insert_duplicate_key_update_two_group_data" value="INSERT
INTO emp(id,age,salary) VALUES (?,?,?),(?,?,?) ON DUPLICATE KEY UPDATE salary =
VALUES(id)+VALUES(age)" db-types="MySQL"/>
+ <sql-case id="insert_duplicate_key_update_with_equation_values"
value="INSERT INTO emp(id,age,salary) VALUES (?,?,?) ON DUPLICATE KEY UPDATE
salary = VALUES(id)" db-types="MySQL"/>
Review comment:
equation means "a = v1+v2". v1 or v2 may be a value or a function .
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services