HandlerSocket-Plugin-for-MySQL icon indicating copy to clipboard operation
HandlerSocket-Plugin-for-MySQL copied to clipboard

DEFAULT CURRENT_TIMESTAMP, ON UPDATE CURRENT_TIMESTAMP

Open crocodile2u opened this issue 9 years ago • 1 comments

At the moment, if I have a DATETIME column with a default value of CURRENT_TIMESTAMP, and I do not specify a value for this column when performing an INSERT with handlersocket - I get "0000-00-00 00:00:00". Same id true for a column of type TIMESTAMP which has "DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP". On insert, if I don't specify a value by hand, it gets created with "0000-00-00 00:00:00". In case I update a row and do not specify a value for the timestamp column, it remains the same as before update. Thus, I have to track all this stuff on the app level. This is not critical but annoying.

crocodile2u avatar Feb 22 '16 13:02 crocodile2u

I see this is quite old, but I can confirm that this is still an issue, at least it is in Percona 5.6 with handlersocket plugin.

oucil avatar Sep 11 '18 20:09 oucil