Commit Graph

22 Commits

Author SHA1 Message Date
71e19a7308 Allocate continuous row id for single INSERT statement (#13648) 2019-11-22 16:22:08 +08:00
a0ea49c342 expression : fix bug in insert select union select. (#13632) 2019-11-20 20:36:03 +08:00
9b0334601a executor: speed up test (#12896) 2019-10-23 21:11:21 +08:00
01cddf63d9 dml : Multiple rows insert in a statement should have consecutive autoID if needed. (#11876)
* consecutive id

* add AllocN interface func for util/kvencoder/allocator.go

* fix allocN test

* fix allocN tests

* fix allocN test 1

* fix allocN test 2

* fix allocN test 3

* fix allocN test 4

* fix cache

* add auto consecutive increment id in insert executor

* add auto consecutive increment id comment in insert executor

* try fix test case

* fix session_test.TestAutoIncrementID autoid overflow

* fix session_test.TestAutoIncrementID unsighed autoid overflow

* fix autoid usigned computing overflow

* fix conflict with suli's PR

* fix index out of range

* merge similar function

* delete fillRowLazy

* fix commment

* fix bug of rebase

* fix auto.go maxUint64 will be allocated

* fix maxInt64 autoid allocated

* fix batch rowIdx update

* add maxUint64 and maxInt64 limit in allocN

* reconstruct the autoid lazy alloc

* fix format

* remove commnet

* use new kind of logutil.logger(ctx) instead of logutil.BgLogger()

* combine alloc() and allocN together

* remove cache of hasValue

* remove cache of hasValue

* remove cache of hasValue

* remove cache of hasValue

* add test : autoID can find in retryInfo

* add test : autoID can find in retryInfo

* extract retry logic

* extract retry logic

* Update executor/insert_common.go

Co-Authored-By: bb7133 <bb7133@gmail.com>

* Update executor/insert_common.go

Co-Authored-By: bb7133 <bb7133@gmail.com>

* fix comment

* fix comment

* fix comment

* fix comment

* fix comment

* return min and max instead of slice in alloc autoid

* return min and max instead of slice in alloc autoid

* return min and max instead of slice in alloc autoid

* add comment for alloc N
2019-10-10 10:34:44 +08:00
2bba5654b4 types/data: the bit data type should be treat as uint64 (#11951) 2019-09-26 19:14:31 +08:00
64298f0278 *: refactoring the code of batchChecker (#12108)
batchChecker is difficult to maintain, we should get rid of it.
In this commit, I catch the BatchGet result into the snapshot, in this way we can
achieve the same goal as the batchChecker
2019-09-10 16:36:49 +08:00
dbdb2f4331 dml : fix last insert id when autoid specified by user in first row. (#11973) 2019-09-02 21:44:35 +08:00
b3f71868c1 executor: fix autoid doesn't handle float, double type and tin… (#11110) 2019-07-22 19:19:54 +08:00
9385c6eca0 executor: fix a bug of 'insert on duplicate update' statement on partitioned table (#11204)
In this statement: insert into t1 set a=1,b=1 on duplicate key update a=1,b=1
Batch checker find a=1,b=1 is duplicated, then in the "on duplicate update" step,
it uses the non-partitioned table to get the old row, which is a bug.
getOldRow returns this error: (1105, u'can not be duplicated row, due to old row not found. handle 1 not found')
2019-07-11 15:24:27 +08:00
af99a0df5a types: fix processing of "0000" value for year type (#9250) 2019-02-11 11:20:22 +08:00
f20c849857 types: support sql_mode ALLOW_INVALID_DATES (#9027) 2019-01-14 19:34:22 +08:00
98b96cc769 executor: speedup unit tests by spliting them into separate suites (#8618) 2018-12-24 21:37:12 +08:00
7528a059cf executor/server/session: add extra info message sent to mysql client (#8285) 2018-12-19 15:32:49 +08:00
3c0d0534f2 server,types: convert zero input correctly for column type year (#8292) 2018-11-14 15:25:08 +08:00
f547869f49 executor: fix affected rows when inserting data (#8233) 2018-11-09 14:22:55 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
33a30cc780 executor: Fix a bug in 'INSERT ... ON DUPLICATE KEY UPDATE' (#7675) 2018-09-14 22:49:17 +08:00
96e44a80f8 executor, expression: calculating the default value for datetime should consider the time zone (#7655) 2018-09-10 16:11:07 +08:00
1255973764 tables: make duplicate error in update clearer (#7495) 2018-08-28 15:34:39 +08:00
2d1fae8e56 plan: fix insert onduplicate key update (#7406) 2018-08-27 18:08:08 +08:00
1f8710762d execute/insert: refine data truncate error msg (#7401) 2018-08-16 00:02:45 +08:00
5bdf34b9bb plan: fix "INSERT ... ON DUPLICATE KEY UPDATE" (#6593) 2018-07-09 13:25:23 +08:00