summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
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 /sql/sql_class.cc
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 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 3b612dadcd0..48ed6df5178 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -317,6 +317,7 @@ void THD::init(void)
void THD::init_for_queries()
{
+ set_time();
ha_enable_transaction(this,TRUE);
reset_root_defaults(mem_root, variables.query_alloc_block_size,