summaryrefslogtreecommitdiff
path: root/mysql-test/std_data/init_file.dat
diff options
context:
space:
mode:
authorunknown <thek@kpdesk.mysql.com>2007-02-19 14:57:54 +0100
committerunknown <thek@kpdesk.mysql.com>2007-02-19 14:57:54 +0100
commita48276798b77fe4846ba5a7f74281cc1c9814357 (patch)
tree7b1b3005a3b08bf70ec31a1286cf9ac6c56e0aaa /mysql-test/std_data/init_file.dat
parent663b9cad825177de7c70be99a2da78116e899362 (diff)
downloadmariadb-git-a48276798b77fe4846ba5a7f74281cc1c9814357.tar.gz
Bug#23240 --init_file statements with NOW() reports '1970-01-01 11:00:00'as the date time
- Starting time of a query sent by bootstrapping wasn't initialized and starting time defaulted to 0. This later used value by NOW- item and was translated to 1970-01-01 11:00:00. - Marketing the time with thd->set_time() before the call to mysql_parse resolves this issue. - set_time was refactored to be part of the thd->init_for_queries- process. mysql-test/r/init_file.result: Manual merge from 4.1 mysql-test/std_data/init_file.dat: Manual merge from 4.1 sql/sql_class.cc: - Moved set_time into init_for_queries process.
Diffstat (limited to 'mysql-test/std_data/init_file.dat')
-rw-r--r--mysql-test/std_data/init_file.dat9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/std_data/init_file.dat b/mysql-test/std_data/init_file.dat
index 814e968eb31..cb8e0778438 100644
--- a/mysql-test/std_data/init_file.dat
+++ b/mysql-test/std_data/init_file.dat
@@ -27,3 +27,12 @@ insert into t2 values (11), (13);
drop procedure p1;
drop function f1;
drop view v1;
+
+#
+# Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time
+#
+CREATE DATABASE IF NOT EXISTS init_file;
+CREATE TABLE IF NOT EXISTS init_file.startup ( startdate DATETIME );
+INSERT INTO init_file.startup VALUES ( NOW() );
+
+