summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2004-06-18 10:11:31 +0400
committerdlenev@brandersnatch.localdomain <>2004-06-18 10:11:31 +0400
commit09ba29e53977d7469c39bf181a6e5853869125ed (patch)
treeff56e2c9414f6b3b146acbeb3081ea40aced7f99 /libmysqld
parent48a47a0ea691b19216b055473212f8ecbdd10bb1 (diff)
downloadmariadb-git-09ba29e53977d7469c39bf181a6e5853869125ed.tar.gz
WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public domain elsie-code). Now user can select current time zone (from the list of time zones described in system tables). All NOW-like functions honor this time zone, values of TIMESTAMP type are interpreted as values in this time zone, so now our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH LOCAL TIME ZONE (or proper PostgresSQL type). WL#1266 "CONVERT_TZ() - basic time with time zone conversion function". Fixed problems described in Bug #2336 (Different number of warnings when inserting bad datetime as string or as number). This required reworking of datetime realted warning hadling (they now generated at Field object level not in conversion functions). Optimization: Now Field class descendants use table->in_use member instead of current_thd macro.
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/Makefile.am2
-rw-r--r--libmysqld/lib_sql.cc12
2 files changed, 8 insertions, 6 deletions
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index b165d7f457b..58e11e4f297 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -56,7 +56,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc time.cc \
unireg.cc uniques.cc stacktrace.c sql_union.cc hash_filo.cc \
- spatial.cc gstream.cc sql_help.cc
+ spatial.cc gstream.cc sql_help.cc tztime.cc
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
libmysqld_a_SOURCES=
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index d1a140c754a..0adf9aeb86a 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -356,6 +356,7 @@ int init_embedded_server(int argc, char **argv, char **groups)
int fake_argc = 1;
char *fake_argv[] = { (char *)"", 0 };
const char *fake_groups[] = { "server", "embedded", 0 };
+ my_bool acl_error;
if (argc)
{
argcp= &argc;
@@ -397,16 +398,17 @@ int init_embedded_server(int argc, char **argv, char **groups)
error_handler_hook = my_message_sql;
+ acl_error= 0;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- if (acl_init((THD *)0, opt_noacl))
+ if (!(acl_error= acl_init((THD *)0, opt_noacl)) &&
+ !opt_noacl)
+ (void) grant_init((THD *)0);
+#endif
+ if (acl_error || my_tz_init((THD *)0, default_tz_name, opt_bootstrap))
{
mysql_server_end();
return 1;
}
- if (!opt_noacl)
- (void) grant_init((THD *)0);
-
-#endif
init_max_user_conn();
init_update_queries();