diff options
author | unknown <thek@kpdesk.mysql.com> | 2007-02-19 09:37:34 +0100 |
---|---|---|
committer | unknown <thek@kpdesk.mysql.com> | 2007-02-19 09:37:34 +0100 |
commit | 114e5b8ddb26aff34f9ea8418dfe73043b912f0f (patch) | |
tree | c20ccbb5b87d573f1bc1702720f048f5f377eeaa /sql/sql_parse.cc | |
parent | 112ef50f287026d41fc509aabdc87fc65d40d7a4 (diff) | |
download | mariadb-git-114e5b8ddb26aff34f9ea8418dfe73043b912f0f.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 file bootstrapping wasn't initialized
and starting time defaulted to 0. This later used value by the Now-
item and is translated to 1970-01-01 11:00:00.
- marking the time with thd->set_time() before the call to
mysql_parse resolves this issue.
mysql-test/r/init_file.result:
Appended test case
mysql-test/std_data/init_file.dat:
Appended test case
mysql-test/t/init_file.test:
Appended test case
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 19add72c23e..7db78a7d013 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1175,6 +1175,7 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg) free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC)); break; } + thd->set_time(); mysql_parse(thd,thd->query,length); close_thread_tables(thd); // Free tables if (thd->is_fatal_error) |