From 858cd187d2a10922efbbb4c478ef23d3dd61efd7 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Sun, 28 Jan 2018 08:57:14 +0200 Subject: [PATCH] Testing '1970-01-01 00:00:00' error --- localtests/datetime-1970/create.sql | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 localtests/datetime-1970/create.sql diff --git a/localtests/datetime-1970/create.sql b/localtests/datetime-1970/create.sql new file mode 100644 index 0000000..7000c34 --- /dev/null +++ b/localtests/datetime-1970/create.sql @@ -0,0 +1,23 @@ +drop table if exists gh_ost_test; +create table gh_ost_test ( + id int auto_increment, + create_time timestamp NULL, + update_time timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + counter int(10) unsigned DEFAULT NULL, + primary key(id) +) auto_increment=1; + +insert into gh_ost_test values (1,'0000-00-00 00:00:00',now(),0); + +drop event if exists gh_ost_test; +delimiter ;; +create event gh_ost_test + on schedule every 1 second + starts current_timestamp + ends current_timestamp + interval 60 second + on completion not preserve + enable + do +begin + update gh_ost_test set counter = counter + 1 where id = 1; +end ;;