[CONJ-1035] PreparedStatement Insert regression - java.sql.SQLSyntaxErrorException: (conn=952) Incorrect datetime value: '2022-12-16 16:21:25.7134102022-12-16 16:21:25.713410' Created: 2022-12-16 Updated: 2022-12-23 Resolved: 2022-12-21 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 3.1.0 |
| Fix Version/s: | 3.1.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Cheong Chung Onn | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Environment: |
Ubuntu 20.04, Mariadb 10.6.11, Java 17 |
||
| Issue Links: |
|
||||||||||||
| Description |
|
Use PreparedStatement to insert 152 tuples of values of 3 elements with contains a LocalDateTime element. Mariadb returns a SQLSyntaxErrorException. The same code works for version 3.0.8. However, the insert statement will work for values right up to 151 tuples. Here is the preparestatement string generated from the Scala code listed below. INSERT INTO Test (`name`, `description`, `created`) VALUES (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?,?,?), (?, ?, ?) Sample code are written in Scala 3. ``` val count = 151 |
| Comments |
| Comment by Diego Dupin [ 2022-12-21 ] | |||||||||||||||
|
thanks for the reproductible case, it helps a lot ! correction is available using snapshot :
| |||||||||||||||
| Comment by Cheong Chung Onn [ 2022-12-21 ] | |||||||||||||||
|
I am glad you have help solved it. BTW, we had the same problem for java.time.LocalTime as well. I hope it is the same category of problem. Again, many thanks resolving the bug | |||||||||||||||
| Comment by Cheong Chung Onn [ 2022-12-21 ] | |||||||||||||||
|
Hi Diego, I just tested using the snapshot and push it to 1500 tuples and it works! Thanks for the speed fix. | |||||||||||||||
| Comment by Diego Dupin [ 2022-12-21 ] | |||||||||||||||
|
about LocalTime, yes, that is the same kind of problem | |||||||||||||||
| Comment by Cheong Chung Onn [ 2022-12-21 ] | |||||||||||||||
|
Noted with thanks! |