roodkcab commented on issue #14144: URL: https://github.com/apache/shardingsphere/issues/14144#issuecomment-997139249
`update id_gen set max_id = last_insert_id(max_id + 1) where type = 1` and then use `select last_insert_id()` is recommended in MySQL [manual](https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_last-insert-id)  for shardingsphere, there's a problem that we use a connection pool, `select last_insert_id` may send to a connection other then the one used for `update` without transaction, which leading to wrong last_insert_id. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
