From a48276798b77fe4846ba5a7f74281cc1c9814357 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Feb 2007 14:57:54 +0100 Subject: 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. --- mysql-test/std_data/init_file.dat | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/std_data/init_file.dat') 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() ); + + -- cgit v1.2.1