shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

shardingsphere4.0.0-RC1,Incorrect datetime value: 'now()' for column 'create_time' at row

Open xfyang1989 opened this issue 7 years ago • 6 comments

shardingsphere4.0.0-RC1,report the following error:

Incorrect datetime value: 'now()' for column 'create_time' at row

ShardingSphere-SQL - Actual SQL: rw0 ::: insert into t_order(id, first_channel, biz_bill_no, orig_bill_no, warehouse_id, sku_code, change_inv_type, change_num, change_time, remark, create_time, create_person, update_time, update_person, is_deleted, version, sale_company, owner_id, bill_type, warehouse_code, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'now()', ?, 'now()', ?, 0, 0, ?, ?, ?, ?, ?) ::: [xx, xx, hh, hhh, xx, bb, xx, -6, 2019-04-24 09:22:54.825, null, xx, xx, xx, xx, 6, 0303, 0]

It seems that sharding treats the mysql now() function as a string.

xfyang1989 avatar Apr 24 '19 01:04 xfyang1989

This problem is OK in version 3.0.1

xfyang1989 avatar Apr 24 '19 02:04 xfyang1989

Is Shardingsphere 4.0.0-RC1 having this problem?

xfyang1989 avatar Apr 25 '19 03:04 xfyang1989

@xfyang1989 it also has this problem, i will fix it

codefairy08 avatar Apr 25 '19 03:04 codefairy08

@xfyang1989 it was fixed,please have a try using latest dev branch code

codefairy08 avatar Apr 25 '19 10:04 codefairy08

3Q,When will these bugs be released to release a new version?

xfyang1989 avatar Apr 25 '19 10:04 xfyang1989

I feel that this 4.0.0-RC1 introduces a new bug, and these features are OK in version 3.0.1. I have used the smallest version of 4.0.0 in the project to keep the wrong version. . I feel that I will not continue to upgrade in the future.

xfyang1989 avatar Apr 25 '19 10:04 xfyang1989