summaryrefslogtreecommitdiff
path: root/mysql-test/r/init_file.result
diff options
context:
space:
mode:
authorthek@kpdesk.mysql.com <>2007-02-19 14:57:54 +0100
committerthek@kpdesk.mysql.com <>2007-02-19 14:57:54 +0100
commit19dfc42eb6938847e74b4874351171baafbd22c3 (patch)
tree7b1b3005a3b08bf70ec31a1286cf9ac6c56e0aaa /mysql-test/r/init_file.result
parentd6062a51e549f6db685cc9b0b1050b726c747962 (diff)
downloadmariadb-git-19dfc42eb6938847e74b4874351171baafbd22c3.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.
Diffstat (limited to 'mysql-test/r/init_file.result')
-rw-r--r--mysql-test/r/init_file.result7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/r/init_file.result b/mysql-test/r/init_file.result
index 1569f2c3d68..6394014f3e5 100644
--- a/mysql-test/r/init_file.result
+++ b/mysql-test/r/init_file.result
@@ -1,3 +1,10 @@
+INSERT INTO init_file.startup VALUES ( NOW() );
+SELECT * INTO @X FROM init_file.startup limit 0,1;
+SELECT * INTO @Y FROM init_file.startup limit 1,1;
+SELECT YEAR(@X)-YEAR(@Y);
+YEAR(@X)-YEAR(@Y)
+0
+DROP DATABASE init_file;
ok
end of 4.1 tests
select * from t1;