mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Manual merge of mysql-5.1-bugteam to
mysql-trunk-merge. Conflicts: Text conflict in sql/sql_priv.h
This commit is contained in:
commit
fa3b2dcb83
326 changed files with 5719 additions and 3177 deletions
|
@ -86,7 +86,9 @@ BitKeeper/post-commit-manual
|
|||
BitKeeper/tmp/*
|
||||
BitKeeper/tmp/bkr3sAHD
|
||||
BitKeeper/tmp/gone
|
||||
CMakeFiles
|
||||
CMakeFiles/*
|
||||
CTestTestfile.cmake
|
||||
COPYING
|
||||
COPYING.LIB
|
||||
Docs/#manual.texi#
|
||||
|
@ -394,6 +396,7 @@ client/rpl_tblmap.cc
|
|||
client/rpl_utility.h
|
||||
client/rpl_utility.cc
|
||||
client/select_test
|
||||
client/sql_const.h
|
||||
client/sql_string.cpp
|
||||
client/ssl_test
|
||||
client/thimble
|
||||
|
@ -1209,7 +1212,7 @@ libmysqld/stacktrace.c
|
|||
libmysqld/strfunc.cc
|
||||
libmysqld/table.cc
|
||||
libmysqld/thr_malloc.cc
|
||||
libmysqld/time.cc
|
||||
libmysqld/sql_time.cc
|
||||
libmysqld/tztime.cc
|
||||
libmysqld/uniques.cc
|
||||
libmysqld/unireg.cc
|
||||
|
@ -1414,7 +1417,7 @@ mysql-test/var/*
|
|||
mysql-test/windows_sys_vars.inc
|
||||
mysql.kdevprj
|
||||
mysql.proj
|
||||
mysql_priv.h
|
||||
sql_priv.h
|
||||
mysqlbinlog/*.ds?
|
||||
mysqlbinlog/*.vcproj
|
||||
mysqlcheck/*.ds?
|
||||
|
|
|
@ -103,13 +103,13 @@ DEFS = -DMYSQL_CLIENT_NO_THREADS \
|
|||
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
|
||||
-DMYSQL_DATADIR="\"$(localstatedir)\""
|
||||
|
||||
sql_src=log_event.h mysql_priv.h rpl_constants.h \
|
||||
sql_src=log_event.h sql_priv.h rpl_constants.h \
|
||||
rpl_tblmap.h rpl_tblmap.cc \
|
||||
log_event.cc my_decimal.h my_decimal.cc \
|
||||
log_event_old.h log_event_old.cc \
|
||||
rpl_record_old.h rpl_record_old.cc \
|
||||
rpl_utility.h rpl_utility.cc \
|
||||
transaction.h
|
||||
transaction.h sql_const.h
|
||||
strings_src=decimal.c dtoa.c
|
||||
|
||||
link_sources:
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <my_sys.h>
|
||||
#include <m_string.h>
|
||||
#include <mysql.h>
|
||||
#include <mysql_embed.h>
|
||||
#include <errmsg.h>
|
||||
#include <my_getopt.h>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "client_priv.h"
|
||||
#include <my_time.h>
|
||||
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "log_event.h"
|
||||
#include "sql_common.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ AC_PREREQ(2.59)
|
|||
# Remember to also update version.c in ndb.
|
||||
# When changing major version number please also check switch statement
|
||||
# in client/mysqlbinlog.cc:check_master_version().
|
||||
AC_INIT([MySQL Server], [5.5.4-m3], [], [mysql])
|
||||
AC_INIT([MySQL Server], [5.5.5-m3], [], [mysql])
|
||||
AC_CONFIG_SRCDIR([sql/mysqld.cc])
|
||||
AC_CANONICAL_SYSTEM
|
||||
# USTAR format gives us the possibility to store longer path names in
|
||||
|
|
|
@ -34,7 +34,7 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
|||
$(HEADERS_GEN_MAKE) probes_mysql.h probes_mysql_nodtrace.h
|
||||
|
||||
noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
|
||||
heap.h my_bitmap.h my_uctype.h \
|
||||
heap.h my_bitmap.h my_uctype.h password.h \
|
||||
myisam.h myisampack.h myisammrg.h ft_global.h\
|
||||
mysys_err.h my_base.h help_start.h help_end.h \
|
||||
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
|
||||
|
|
|
@ -17,6 +17,21 @@
|
|||
|
||||
#ifndef _hash_h
|
||||
#define _hash_h
|
||||
|
||||
#include "my_global.h" /* uchar */
|
||||
#include "my_sys.h" /* DYNAMIC_ARRAY */
|
||||
|
||||
/*
|
||||
This forward declaration is used from C files where the real
|
||||
definition is included before. Since C does not allow repeated
|
||||
typedef declarations, even when identical, the definition may not be
|
||||
repeated.
|
||||
*/
|
||||
#ifndef CHARSET_INFO_DEFINED
|
||||
#define CHARSET_INFO_DEFINED
|
||||
typedef struct charset_info_st CHARSET_INFO;
|
||||
#endif /* CHARSET_INFO_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
#ifndef _keycache_h
|
||||
#define _keycache_h
|
||||
|
||||
#include "my_sys.h" /* flush_type */
|
||||
|
||||
C_MODE_START
|
||||
|
||||
/* declare structures that is used by st_key_cache */
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
|
||||
/*
|
||||
A better inplementation of the UNIX ctype(3) library.
|
||||
Notes: my_global.h should be included before ctype.h
|
||||
*/
|
||||
|
||||
#ifndef _m_ctype_h
|
||||
#define _m_ctype_h
|
||||
|
||||
#include <my_attribute.h>
|
||||
#include "my_global.h" /* uint16, uchar */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -265,6 +265,12 @@ extern MY_CHARSET_HANDLER my_charset_8bit_handler;
|
|||
extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
|
||||
|
||||
|
||||
/*
|
||||
We define this CHARSET_INFO_DEFINED here to prevent a repeat of the
|
||||
typedef in hash.c, which will cause a compiler error.
|
||||
*/
|
||||
#define CHARSET_INFO_DEFINED
|
||||
|
||||
/* See strings/CHARSET_INFO.txt about information on this structure */
|
||||
typedef struct charset_info_st
|
||||
{
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
|
||||
#ifndef _m_string_h
|
||||
#define _m_string_h
|
||||
|
||||
#include "my_global.h" /* HAVE_* */
|
||||
|
||||
#ifndef __USE_GNU
|
||||
#define __USE_GNU /* We want to use stpcpy */
|
||||
#endif
|
||||
|
@ -266,13 +269,6 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
|
|||
#endif
|
||||
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
|
||||
|
||||
/* my_vsnprintf.c */
|
||||
|
||||
extern size_t my_vsnprintf(char *str, size_t n,
|
||||
const char *format, va_list ap);
|
||||
extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
@ -365,4 +361,10 @@ static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
|
|||
return (end);
|
||||
}
|
||||
|
||||
static inline void lex_string_set(LEX_STRING *lex_str, const char *c_str)
|
||||
{
|
||||
lex_str->str= (char *) c_str;
|
||||
lex_str->length= strlen(c_str);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -145,7 +145,23 @@ extern const char* _db_get_func_(void);
|
|||
#define DBUG_CRASH_VOID_RETURN do { return; } while(0)
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
|
||||
#ifdef EXTRA_DEBUG
|
||||
/**
|
||||
Sync points allow us to force the server to reach a certain line of code
|
||||
and block there until the client tells the server it is ok to go on.
|
||||
The client tells the server to block with SELECT GET_LOCK()
|
||||
and unblocks it with SELECT RELEASE_LOCK(). Used for debugging difficult
|
||||
concurrency problems
|
||||
*/
|
||||
#define DBUG_SYNC_POINT(lock_name,lock_timeout) \
|
||||
debug_sync_point(lock_name,lock_timeout)
|
||||
void debug_sync_point(const char* lock_name, uint lock_timeout);
|
||||
#else
|
||||
#define DBUG_SYNC_POINT(lock_name,lock_timeout)
|
||||
#endif /* EXTRA_DEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -13,17 +13,17 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _my_dir_h
|
||||
#define _my_dir_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MY_DIR_H
|
||||
#define MY_DIR_H
|
||||
|
||||
#include "my_global.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Defines for my_dir and my_stat */
|
||||
|
||||
#define MY_S_IFMT S_IFMT /* type of file */
|
||||
|
@ -101,9 +101,9 @@ extern void my_dirend(MY_DIR *buffer);
|
|||
extern MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags);
|
||||
extern int my_fstat(int filenr, MY_STAT *stat_area, myf MyFlags);
|
||||
|
||||
#endif /* MY_DIR_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* MY_DIR_H */
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#ifndef _my_getopt_h
|
||||
#define _my_getopt_h
|
||||
|
||||
#include "my_sys.h" /* loglevel */
|
||||
|
||||
C_MODE_START
|
||||
|
||||
#define GET_NO_ARG 1
|
||||
|
|
|
@ -1205,6 +1205,12 @@ typedef unsigned long my_off_t;
|
|||
#endif /*_WIN32*/
|
||||
#define MY_FILEPOS_ERROR (~(my_off_t) 0)
|
||||
|
||||
/*
|
||||
TODO Convert these to use Bitmap class.
|
||||
*/
|
||||
typedef ulonglong table_map; /* Used for table bits in join */
|
||||
typedef ulong nesting_map; /* Used for flags of nesting constructs */
|
||||
|
||||
#if defined(__WIN__)
|
||||
#define socket_errno WSAGetLastError()
|
||||
#define SOCKET_EINTR WSAEINTR
|
||||
|
@ -1675,7 +1681,13 @@ inline void operator delete[](void*, void*) { /* Do nothing */ }
|
|||
#if !defined(max)
|
||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define x_free(A) \
|
||||
do { my_free((uchar*)(A), MYF(MY_WME|MY_FAE|MY_ALLOW_ZERO_PTR)); } while (0)
|
||||
#define safeFree(X) \
|
||||
do { if (X) { my_free((uchar*)(X), MYF(0)); (X) = NULL; } } while (0)
|
||||
|
||||
/*
|
||||
Only Linux is known to need an explicit sync of the directory to make sure a
|
||||
file creation/deletion/renaming in(from,to) this directory durable.
|
||||
|
@ -1755,4 +1767,20 @@ static inline double rint(double x)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* Defines that are unique to the embedded version of MySQL */
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
|
||||
/* Things we don't need in the embedded version of MySQL */
|
||||
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
|
||||
|
||||
#undef HAVE_PSTACK /* No stacktrace */
|
||||
#undef HAVE_OPENSSL
|
||||
#undef HAVE_SMEM /* No shared memory */
|
||||
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
|
||||
|
||||
#define DONT_USE_RAID
|
||||
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
||||
#endif /* my_global_h */
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "m_ctype.h" /* CHARSET_INFO */
|
||||
|
||||
/*
|
||||
There is a hard limit for the maximum number of keys as there are only
|
||||
8 bits in the index file header for the number of keys in a table.
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
|
||||
#ifndef _my_net_h
|
||||
#define _my_net_h
|
||||
|
||||
#include "my_global.h" /* C_MODE_START, C_MODE_END */
|
||||
|
||||
C_MODE_START
|
||||
|
||||
#include <errno.h>
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#ifndef _my_pthread_h
|
||||
#define _my_pthread_h
|
||||
|
||||
#include "my_global.h" /* myf */
|
||||
|
||||
#ifndef ETIME
|
||||
#define ETIME ETIMEDOUT /* For FreeBSD */
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
#ifndef _my_sys_h
|
||||
#define _my_sys_h
|
||||
|
||||
#include "my_global.h" /* C_MODE_START, C_MODE_END */
|
||||
|
||||
C_MODE_START
|
||||
|
||||
#ifdef HAVE_AIOWAIT
|
||||
|
|
|
@ -20,6 +20,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include "my_base.h" /* get 'enum ha_rkey_function' */
|
||||
#include "my_alloc.h" /* MEM_ROOT */
|
||||
|
||||
/* Worst case tree is half full. This gives use 2^(MAX_TREE_HEIGHT/2) leafs */
|
||||
#define MAX_TREE_HEIGHT 64
|
||||
|
|
35
include/mysql/innodb_priv.h
Normal file
35
include/mysql/innodb_priv.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef INNODB_PRIV_INCLUDED
|
||||
#define INNODB_PRIV_INCLUDED
|
||||
|
||||
/** @file Declaring server-internal functions that are used by InnoDB. */
|
||||
|
||||
#include <sql_priv.h>
|
||||
|
||||
class THD;
|
||||
|
||||
uint filename_to_tablename(const char *from, char *to, uint to_length);
|
||||
int get_quote_char_for_identifier(THD *thd, const char *name, uint length);
|
||||
bool check_global_access(THD *thd, ulong want_access);
|
||||
|
||||
uint strconvert(CHARSET_INFO *from_cs, const char *from,
|
||||
CHARSET_INFO *to_cs, char *to, uint to_length,
|
||||
uint *errors);
|
||||
void sql_print_error(const char *format, ...);
|
||||
|
||||
|
||||
#endif /* INNODB_PRIV_INCLUDED */
|
|
@ -20,6 +20,8 @@
|
|||
#include <string.h>
|
||||
/* For MY_STAT */
|
||||
#include <my_dir.h>
|
||||
/* For my_chsize */
|
||||
#include <my_sys.h>
|
||||
|
||||
/**
|
||||
@file mysql/psi/mysql_file.h
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
#ifndef _mysys_err_h
|
||||
#define _mysys_err_h
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "my_global.h" /* NEAR */
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
|
32
include/password.h
Normal file
32
include/password.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef PASSWORD_INCLUDED
|
||||
#define PASSWORD_INCLUDED
|
||||
|
||||
#include "my_global.h"
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void my_make_scrambled_password_323(char *to, const char *password,
|
||||
size_t pass_len);
|
||||
void my_make_scrambled_password(char *to, const char *password,
|
||||
size_t pass_len);
|
||||
|
||||
void hash_password(ulong *result, const char *password, uint password_len);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* PASSWORD_INCLUDED */
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#ifndef _queues_h
|
||||
#define _queues_h
|
||||
|
||||
#include "my_global.h" /* uchar */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __cplusplus
|
||||
typedef struct st_vio Vio;
|
||||
#endif /* __cplusplus */
|
||||
|
||||
enum enum_vio_type
|
||||
{
|
||||
VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE,
|
||||
|
|
|
@ -83,7 +83,7 @@ link_sources:
|
|||
#
|
||||
# A list of needed headers collected from the deps information 000213
|
||||
nh = my_global.h config-win32.h dbug.h errmsg.h \
|
||||
m_ctype.h m_string.h \
|
||||
m_ctype.h m_string.h password.h \
|
||||
my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h \
|
||||
mysql.h mysql_com.h mysql_version.h mysqld_error.h \
|
||||
mysys_err.h my_pthread.h thr_alarm.h violite.h hash.h \
|
||||
|
|
|
@ -76,7 +76,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
|||
../sql/sql_trigger.cc ../sql/sql_udf.cc ../sql/sql_union.cc
|
||||
../sql/sql_update.cc ../sql/sql_view.cc ../sql/sql_profile.cc
|
||||
../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
|
||||
../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
|
||||
../sql/sql_time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
|
||||
../sql/partition_info.cc ../sql/sql_connect.cc
|
||||
../sql/scheduler.cc ../sql/sql_audit.cc
|
||||
../sql/event_parse_data.cc
|
||||
|
|
|
@ -69,7 +69,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
|||
sql_prepare.cc sql_derived.cc sql_rename.cc \
|
||||
sql_select.cc sql_do.cc sql_show.cc set_var.cc sys_vars.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 \
|
||||
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc sql_time.cc \
|
||||
unireg.cc uniques.cc sql_union.cc hash_filo.cc \
|
||||
spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \
|
||||
sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
|
||||
|
|
|
@ -13,11 +13,14 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "my_global.h" // HAVE_*
|
||||
|
||||
#ifdef HAVE_QUERY_CACHE
|
||||
#include <mysql.h>
|
||||
#include "emb_qcache.h"
|
||||
#include "embedded_priv.h"
|
||||
#include "sql_class.h" // THD
|
||||
|
||||
void Querycache_stream::store_uchar(uchar c)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "sql_cache.h" /* Query_cache_block */
|
||||
|
||||
class Querycache_stream
|
||||
{
|
||||
uchar *cur_data;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include <my_global.h>
|
||||
#include <mysql.h>
|
||||
#include <mysql_embed.h>
|
||||
#include <mysqld_error.h>
|
||||
#include <my_pthread.h>
|
||||
#include "embedded_priv.h"
|
||||
|
|
|
@ -15,6 +15,7 @@ main.mysqlbinlog_row_innodb @solaris # Bug#52202 2010-03-22 alik mysqlbinlog
|
|||
main.mysqlbinlog_row_myisam @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
||||
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
||||
main.plugin* @solaris # Bug#47146 Linking problem with example plugin when dtrace enabled
|
||||
main.query_cache_debug @linux # Bug#52356 2010-04-10 alik query_cache_debug fails on Linux
|
||||
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
|
||||
|
|
|
@ -13,13 +13,17 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include <mysql_priv.h>
|
||||
#include <sql_priv.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <mysql_version.h>
|
||||
#include <mysql/plugin.h>
|
||||
#include <my_global.h>
|
||||
#include <my_dir.h>
|
||||
#include "my_pthread.h" // pthread_handler_t
|
||||
#include "my_sys.h" // my_write, my_malloc
|
||||
#include "m_string.h" // strlen
|
||||
#include "sql_plugin.h" // st_plugin_int
|
||||
|
||||
/*
|
||||
Disable __attribute__() on non-gcc compilers.
|
||||
|
|
|
@ -20,11 +20,13 @@
|
|||
|
||||
#define MYSQL_SERVER
|
||||
#define HAVE_REPLICATION
|
||||
#include <mysql_priv.h>
|
||||
#include <sql_priv.h>
|
||||
#include "unireg.h"
|
||||
#include <my_global.h>
|
||||
#include <my_pthread.h>
|
||||
#include <mysql/plugin.h>
|
||||
#include <replication.h>
|
||||
#include "log.h" /* sql_print_information */
|
||||
|
||||
typedef struct st_mysql_show_var SHOW_VAR;
|
||||
typedef struct st_mysql_sys_var SYS_VAR;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
|
||||
#include "semisync_master.h"
|
||||
#include "sql_class.h" // THD
|
||||
|
||||
ReplSemiSyncMaster repl_semisync;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
|
||||
#include "semisync_slave.h"
|
||||
#include <mysql.h>
|
||||
|
||||
ReplSemiSyncSlave repl_semisync;
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ SET (SQL_SOURCE
|
|||
sql_repl.cc sql_select.cc sql_show.cc sql_state.c sql_string.cc
|
||||
sql_table.cc sql_test.cc sql_trigger.cc sql_udf.cc sql_union.cc
|
||||
sql_update.cc sql_view.cc strfunc.cc table.cc thr_malloc.cc
|
||||
time.cc tztime.cc uniques.cc unireg.cc item_xmlfunc.cc
|
||||
sql_time.cc tztime.cc uniques.cc unireg.cc item_xmlfunc.cc
|
||||
rpl_tblmap.cc sql_binlog.cc event_scheduler.cc event_data_objects.cc
|
||||
event_queue.cc event_db_repository.cc
|
||||
sql_tablespace.cc events.cc ../sql-common/my_user.c
|
||||
|
|
|
@ -84,22 +84,29 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
|||
item_strfunc.h item_timefunc.h \
|
||||
item_xmlfunc.h sql_plugin_services.h \
|
||||
item_create.h item_subselect.h item_row.h \
|
||||
mysql_priv.h item_geofunc.h sql_bitmap.h \
|
||||
sql_priv.h item_geofunc.h sql_bitmap.h \
|
||||
procedure.h sql_class.h sql_lex.h sql_list.h \
|
||||
sql_map.h sql_string.h unireg.h \
|
||||
sql_error.h field.h handler.h mysqld_suffix.h \
|
||||
sql_profile.h \
|
||||
sql_profile.h mysqld.h sql_help.h frm_crypt.h \
|
||||
ha_ndbcluster.h ha_ndbcluster_cond.h \
|
||||
ha_ndbcluster_binlog.h ha_ndbcluster_tables.h \
|
||||
ha_partition.h rpl_constants.h \
|
||||
debug_sync.h \
|
||||
opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
|
||||
rpl_reporting.h \
|
||||
rpl_reporting.h sql_locale.h sql_parse.h \
|
||||
log.h sql_show.h rpl_rli.h rpl_mi.h \
|
||||
sql_select.h structs.h table.h sql_udf.h hash_filo.h \
|
||||
lex.h lex_symbol.h sql_acl.h sql_crypt.h \
|
||||
lex.h lex_symbol.h sql_acl.h sql_crypt.h sql_base.h \
|
||||
sql_table.h key.h lock.h thr_malloc.h strfunc.h \
|
||||
sql_delete.h sql_insert.h sql_update.h sql_db.h \
|
||||
sql_connect.h sql_rename.h sql_time.h sql_tablespace.h \
|
||||
hostname.h sql_test.h records.h filesort.h \
|
||||
sql_derived.h sql_load.h sql_handler.h init.h \
|
||||
derror.h sql_union.h des_key_file.h sql_binlog.h \
|
||||
discover.h sql_manager.h sql_do.h \
|
||||
sql_repl.h slave.h rpl_filter.h rpl_injector.h \
|
||||
log_event.h rpl_record.h \
|
||||
log_event.h rpl_record.h sql_const.h \
|
||||
log_event_old.h rpl_record_old.h \
|
||||
sql_sort.h sql_cache.h set_var.h sys_vars_shared.h \
|
||||
spatial.h gstream.h client_settings.h tzfile.h \
|
||||
|
@ -137,7 +144,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
|
|||
unireg.cc des_key_file.cc \
|
||||
log_event.cc rpl_record.cc \
|
||||
log_event_old.cc rpl_record_old.cc \
|
||||
discover.cc time.cc opt_range.cc opt_sum.cc \
|
||||
discover.cc sql_time.cc opt_range.cc opt_sum.cc \
|
||||
records.cc filesort.cc handler.cc \
|
||||
ha_partition.cc \
|
||||
debug_sync.cc \
|
||||
|
|
|
@ -321,12 +321,13 @@
|
|||
|
||||
/*
|
||||
Due to weaknesses in our include files, we need to include
|
||||
mysql_priv.h here. To have THD declared, we need to include
|
||||
sql_priv.h here. To have THD declared, we need to include
|
||||
sql_class.h. This includes log_event.h, which in turn requires
|
||||
declarations from mysql_priv.h (e.g. OPTION_AUTO_IS_NULL).
|
||||
mysql_priv.h includes almost everything, so is sufficient here.
|
||||
declarations from sql_priv.h (e.g. OPTION_AUTO_IS_NULL).
|
||||
sql_priv.h includes almost everything, so is sufficient here.
|
||||
*/
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "sql_parse.h"
|
||||
|
||||
/*
|
||||
Action to perform at a synchronization point.
|
||||
|
@ -394,7 +395,7 @@ extern "C" void (*debug_sync_C_callback_ptr)(const char *, size_t);
|
|||
|
||||
We cannot place a sync point directly in C files (like those in mysys or
|
||||
certain storage engines written mostly in C like MyISAM or Maria). Because
|
||||
they are C code and do not include mysql_priv.h. So they do not know the
|
||||
they are C code and do not include sql_priv.h. So they do not know the
|
||||
macro DEBUG_SYNC(thd, sync_point_name). The macro needs a 'thd' argument.
|
||||
Hence it cannot be used in files outside of the sql/ directory.
|
||||
|
||||
|
|
|
@ -21,8 +21,13 @@
|
|||
Read language depeneded messagefile
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "derror.h"
|
||||
#include "mysys_err.h"
|
||||
#include "mysqld.h" // lc_messages_dir
|
||||
#include "derror.h" // read_texts
|
||||
#include "sql_class.h" // THD
|
||||
|
||||
static void init_myfunc_errs(void);
|
||||
|
||||
|
|
25
sql/derror.h
Normal file
25
sql/derror.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef DERROR_INCLUDED
|
||||
#define DERROR_INCLUDED
|
||||
|
||||
#include "my_global.h" /* uint */
|
||||
|
||||
bool init_errmessage(void);
|
||||
bool read_texts(const char *file_name, const char *language,
|
||||
const char ***point, uint error_messages);
|
||||
|
||||
#endif /* DERROR_INCLUDED */
|
|
@ -13,7 +13,10 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "my_global.h" // HAVE_*
|
||||
#include "sql_priv.h"
|
||||
#include "des_key_file.h" // st_des_keyschedule, st_des_keyblock
|
||||
#include "log.h" // sql_print_error
|
||||
#include <m_ctype.h>
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
|
|
40
sql/des_key_file.h
Normal file
40
sql/des_key_file.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef DES_KEY_FILE_INCLUDED
|
||||
#define DES_KEY_FILE_INCLUDED
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <openssl/des.h>
|
||||
|
||||
#include "violite.h" /* DES_cblock, DES_key_schedule */
|
||||
|
||||
struct st_des_keyblock
|
||||
{
|
||||
DES_cblock key1, key2, key3;
|
||||
};
|
||||
|
||||
struct st_des_keyschedule
|
||||
{
|
||||
DES_key_schedule ks1, ks2, ks3;
|
||||
};
|
||||
|
||||
extern struct st_des_keyschedule des_keyschedule[10];
|
||||
extern uint des_default_key;
|
||||
|
||||
bool load_des_key_file(const char *file_name);
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
||||
#endif /* DES_KEY_FILE_INCLUDED */
|
|
@ -21,7 +21,9 @@
|
|||
Functions for discover of frm file from handler
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "discover.h"
|
||||
#include <my_dir.h>
|
||||
|
||||
/**
|
||||
|
|
24
sql/discover.h
Normal file
24
sql/discover.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef DISCOVER_INCLUDED
|
||||
#define DISCOVER_INCLUDED
|
||||
|
||||
#include "my_global.h" /* uchar */
|
||||
|
||||
int readfrm(const char *name, uchar **data, size_t *length);
|
||||
int writefrm(const char* name, const uchar* data, size_t len);
|
||||
|
||||
#endif /* DISCOVER_INCLUDED */
|
|
@ -14,11 +14,23 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#define MYSQL_LEX 1
|
||||
#include "mysql_priv.h"
|
||||
#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "sql_parse.h" // parse_sql
|
||||
#include "strfunc.h" // find_string_in_array
|
||||
#include "sql_db.h" // get_default_db_collation
|
||||
#include "sql_time.h" // interval_type_to_name,
|
||||
// date_add_interval,
|
||||
// calc_time_diff
|
||||
#include "tztime.h" // my_tz_find, my_tz_OFFSET0, struct Time_zone
|
||||
#include "sql_acl.h" // EVENT_ACL, SUPER_ACL
|
||||
#include "sp.h" // load_charset, load_collation
|
||||
#include "events.h"
|
||||
#include "event_data_objects.h"
|
||||
#include "event_db_repository.h"
|
||||
#include "sp_head.h"
|
||||
#include "sql_show.h" // append_definer, append_identifier
|
||||
|
||||
/**
|
||||
@addtogroup Event_Scheduler
|
||||
|
|
|
@ -23,6 +23,12 @@
|
|||
*/
|
||||
|
||||
#include "event_parse_data.h"
|
||||
#include "thr_lock.h" /* thr_lock_type */
|
||||
|
||||
class Field;
|
||||
class THD;
|
||||
class Time_zone;
|
||||
struct TABLE;
|
||||
|
||||
class Event_queue_element_for_exec
|
||||
{
|
||||
|
|
|
@ -13,12 +13,21 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "sql_base.h" // close_thread_tables
|
||||
#include "event_db_repository.h"
|
||||
#include "key.h" // key_copy
|
||||
#include "sql_db.h" // get_default_db_collation
|
||||
#include "sql_time.h" // interval_type_to_name
|
||||
#include "tztime.h" // struct Time_zone
|
||||
#include "sql_acl.h" // SUPER_ACL, MYSQL_DB_FIELD_COUNT, mysql_db_table_fields
|
||||
#include "records.h" // init_read_record, end_read_record
|
||||
#include "sp_head.h"
|
||||
#include "event_data_objects.h"
|
||||
#include "events.h"
|
||||
#include "sql_show.h"
|
||||
#include "lock.h" // MYSQL_LOCK_IGNORE_TIMEOUT
|
||||
|
||||
/**
|
||||
@addtogroup Event_Scheduler
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "sp_head.h"
|
||||
#include "event_parse_data.h"
|
||||
#include "sql_time.h" // TIME_to_timestamp
|
||||
|
||||
/*
|
||||
Returns a new instance
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
#ifndef _EVENT_PARSE_DATA_H_
|
||||
#define _EVENT_PARSE_DATA_H_
|
||||
|
||||
#include "sql_list.h" /* Sql_alloc */
|
||||
|
||||
class Item;
|
||||
class THD;
|
||||
class sp_name;
|
||||
|
||||
#define EVEX_GET_FIELD_FAILED -2
|
||||
#define EVEX_BAD_PARAMS -5
|
||||
#define EVEX_MICROSECOND_UNSUP -6
|
||||
|
|
|
@ -13,10 +13,14 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "event_queue.h"
|
||||
#include "event_data_objects.h"
|
||||
#include "sql_audit.h"
|
||||
#include "tztime.h" // my_tz_find, my_tz_OFFSET0, struct Time_zone
|
||||
#include "log.h" // sql_print_error
|
||||
#include "sql_class.h" // struct THD
|
||||
|
||||
/**
|
||||
@addtogroup Event_Scheduler
|
||||
|
|
|
@ -30,6 +30,10 @@ extern PSI_mutex_key key_LOCK_event_queue;
|
|||
extern PSI_cond_key key_COND_queue_state;
|
||||
#endif /* HAVE_PSI_INTERFACE */
|
||||
|
||||
#include "queues.h" // QUEUE
|
||||
#include "sql_string.h" /* LEX_STRING */
|
||||
#include "my_time.h" /* my_time_t, interval_type */
|
||||
|
||||
class Event_basic;
|
||||
class Event_queue_element;
|
||||
class Event_queue_element_for_exec;
|
||||
|
|
|
@ -13,12 +13,15 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "event_scheduler.h"
|
||||
#include "events.h"
|
||||
#include "event_data_objects.h"
|
||||
#include "event_scheduler.h"
|
||||
#include "event_queue.h"
|
||||
#include "event_db_repository.h"
|
||||
#include "sql_connect.h" // init_new_connection_handler_thread
|
||||
#include "sql_acl.h" // SUPER_ACL
|
||||
|
||||
/**
|
||||
@addtogroup Event_Scheduler
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
class Event_queue;
|
||||
class Event_job_data;
|
||||
class Event_db_repository;
|
||||
class Event_queue_element_for_exec;
|
||||
class Events;
|
||||
class THD;
|
||||
|
||||
void
|
||||
pre_init_event_thread(THD* thd);
|
||||
|
|
|
@ -13,8 +13,17 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "sql_parse.h" // check_access
|
||||
#include "sql_base.h" // close_thread_tables
|
||||
#include "sql_show.h" // append_definer
|
||||
#include "events.h"
|
||||
#include "sql_db.h" // check_db_dir_existence
|
||||
#include "sql_table.h" // write_bin_log
|
||||
#include "tztime.h" // struct Time_zone
|
||||
#include "sql_acl.h" // EVENT_ACL
|
||||
#include "records.h" // init_read_record, end_read_record
|
||||
#include "event_data_objects.h"
|
||||
#include "event_db_repository.h"
|
||||
#include "event_queue.h"
|
||||
|
|
|
@ -32,10 +32,17 @@ extern PSI_cond_key key_event_scheduler_COND_state;
|
|||
extern PSI_thread_key key_thread_event_scheduler, key_thread_event_worker;
|
||||
#endif /* HAVE_PSI_INTERFACE */
|
||||
|
||||
class Event_parse_data;
|
||||
#include "sql_string.h" /* LEX_STRING */
|
||||
#include "my_time.h" /* interval_type */
|
||||
|
||||
class Event_db_repository;
|
||||
class Event_parse_data;
|
||||
class Event_queue;
|
||||
class Event_scheduler;
|
||||
struct TABLE_LIST;
|
||||
class THD;
|
||||
typedef class Item COND;
|
||||
typedef struct charset_info_st CHARSET_INFO;
|
||||
|
||||
/* Return codes */
|
||||
enum enum_events_error_code
|
||||
|
|
11
sql/field.cc
11
sql/field.cc
|
@ -25,10 +25,19 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "sql_select.h"
|
||||
#include "rpl_rli.h" // Pull in Relay_log_info
|
||||
#include "slave.h" // Pull in rpl_master_has_bug()
|
||||
#include "strfunc.h" // find_type2, find_set
|
||||
#include "sql_time.h" // str_to_datetime_with_warn,
|
||||
// str_to_time_with_warn,
|
||||
// TIME_to_timestamp,
|
||||
// make_time, make_date,
|
||||
// make_truncated_value_warning
|
||||
#include "tztime.h" // struct Time_zone
|
||||
#include "filesort.h" // change_double_for_sort
|
||||
#include "log_event.h" // class Table_map_log_event
|
||||
#include <m_ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
33
sql/field.h
33
sql/field.h
|
@ -25,6 +25,12 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
#include "mysqld.h" /* system_charset_info */
|
||||
#include "table.h" /* TABLE */
|
||||
#include "sql_string.h" /* String */
|
||||
#include "my_decimal.h" /* my_decimal */
|
||||
#include "sql_error.h" /* MYSQL_ERROR */
|
||||
|
||||
#define DATETIME_DEC 6
|
||||
const uint32 max_field_size= (uint32) 4294967295U;
|
||||
|
||||
|
@ -32,6 +38,33 @@ class Send_field;
|
|||
class Protocol;
|
||||
class Create_field;
|
||||
class Relay_log_info;
|
||||
class Field;
|
||||
|
||||
enum enum_check_fields
|
||||
{
|
||||
CHECK_FIELD_IGNORE,
|
||||
CHECK_FIELD_WARN,
|
||||
CHECK_FIELD_ERROR_FOR_NULL
|
||||
};
|
||||
|
||||
|
||||
enum Derivation
|
||||
{
|
||||
DERIVATION_IGNORABLE= 6,
|
||||
DERIVATION_NUMERIC= 5,
|
||||
DERIVATION_COERCIBLE= 4,
|
||||
DERIVATION_SYSCONST= 3,
|
||||
DERIVATION_IMPLICIT= 2,
|
||||
DERIVATION_NONE= 1,
|
||||
DERIVATION_EXPLICIT= 0
|
||||
};
|
||||
|
||||
#define STORAGE_TYPE_MASK 7
|
||||
#define COLUMN_FORMAT_MASK 7
|
||||
#define COLUMN_FORMAT_SHIFT 3
|
||||
|
||||
#define my_charset_numeric my_charset_latin1
|
||||
#define MY_REPERTOIRE_NUMERIC MY_REPERTOIRE_ASCII
|
||||
|
||||
struct st_cache_field;
|
||||
int field_conv(Field *to,Field *from);
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
gives much more speed.
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "sql_class.h" // THD
|
||||
#include <m_ctype.h>
|
||||
|
||||
static void do_field_eq(Copy_field *copy)
|
||||
|
|
|
@ -21,13 +21,17 @@
|
|||
Sorts a database
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "filesort.h"
|
||||
#include "unireg.h" // REQUIRED by other includes
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h> /* for macro offsetof */
|
||||
#endif
|
||||
#include <m_ctype.h>
|
||||
#include "sql_sort.h"
|
||||
#include "probes_mysql.h"
|
||||
#include "sql_test.h" // TEST_filesort
|
||||
#include "opt_range.h" // SQL_SELECT
|
||||
|
||||
#ifndef THREAD
|
||||
#define SKIP_DBUG_IN_FILESORT
|
||||
|
|
36
sql/filesort.h
Normal file
36
sql/filesort.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef FILESORT_INCLUDED
|
||||
#define FILESORT_INCLUDED
|
||||
|
||||
class SQL_SELECT;
|
||||
|
||||
#include "my_global.h" /* uint, uchar */
|
||||
#include "my_base.h" /* ha_rows */
|
||||
|
||||
class SQL_SELECT;
|
||||
class THD;
|
||||
struct TABLE;
|
||||
typedef struct st_sort_field SORT_FIELD;
|
||||
|
||||
ha_rows filesort(THD *thd, TABLE *table, st_sort_field *sortorder,
|
||||
uint s_length, SQL_SELECT *select,
|
||||
ha_rows max_rows, bool sort_positions,
|
||||
ha_rows *examined_rows);
|
||||
void filesort_free_buffers(TABLE *table, bool full);
|
||||
void change_double_for_sort(double nr,uchar *to);
|
||||
|
||||
#endif /* FILESORT_INCLUDED */
|
|
@ -21,7 +21,8 @@
|
|||
** mysql binary.
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "frm_crypt.h"
|
||||
|
||||
#ifdef HAVE_CRYPTED_FRM
|
||||
|
||||
|
|
23
sql/frm_crypt.h
Normal file
23
sql/frm_crypt.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef FRM_CRYPT_INCLUDED
|
||||
#define FRM_CRYPT_INCLUDED
|
||||
|
||||
class SQL_CRYPT;
|
||||
|
||||
SQL_CRYPT *get_crypt_for_frm(void);
|
||||
|
||||
#endif /* FRM_CRYPT_INCLUDED */
|
|
@ -18,7 +18,9 @@
|
|||
NOTE: These functions assumes that the string is end \0 terminated!
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "gstream.h"
|
||||
#include "m_string.h" // LEX_STRING
|
||||
|
||||
enum Gis_read_stream::enum_tok_types Gis_read_stream::get_next_toc_type()
|
||||
{
|
||||
|
|
|
@ -17,6 +17,13 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
#include "my_global.h" /* NULL, NullS */
|
||||
#include "my_sys.h" /* MY_ALLOW_ZERO_PTR */
|
||||
#include "m_ctype.h" /* my_charset_latin1, my_charset_bin */
|
||||
|
||||
typedef struct charset_info_st CHARSET_INFO;
|
||||
typedef struct st_mysql_lex_string LEX_STRING;
|
||||
|
||||
class Gis_read_stream
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -26,7 +26,15 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h" // REQUIRED: for other includes
|
||||
#include "sql_table.h" // build_table_filename,
|
||||
// tablename_to_filename,
|
||||
// filename_to_tablename
|
||||
#include "sql_partition.h" // HA_CAN_*, partition_info, part_id_range
|
||||
#include "sql_base.h" // close_cached_tables
|
||||
#include "discover.h" // readfrm
|
||||
#include "sql_acl.h" // wild_case_compare
|
||||
#include "rpl_mi.h"
|
||||
|
||||
/*
|
||||
|
@ -48,8 +56,11 @@ int ha_ndb_dummy;
|
|||
#include "ha_ndbcluster_binlog.h"
|
||||
#include "ha_ndbcluster_tables.h"
|
||||
|
||||
#include <mysql/plugin.h>
|
||||
#include "sql_plugin.h"
|
||||
#include "probes_mysql.h"
|
||||
#include "sql_show.h" // init_fill_schema_files_row,
|
||||
// schema_table_store_record
|
||||
#include "sql_test.h" // print_where
|
||||
|
||||
#ifdef ndb_dynamite
|
||||
#undef assert
|
||||
|
|
|
@ -51,6 +51,8 @@ class NdbIndexStat;
|
|||
class NdbEventOperation;
|
||||
class ha_ndbcluster_cond;
|
||||
|
||||
#include "sql_partition.h" /* part_id_range */
|
||||
|
||||
// connectstring to cluster if given by mysqld
|
||||
extern const char *ndbcluster_connectstring;
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h" // REQUIRED: for other includes
|
||||
#include "sql_show.h"
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
#include "ha_ndbcluster.h"
|
||||
|
@ -28,6 +29,14 @@
|
|||
#include "ndb_cluster_connection.hpp"
|
||||
#include <util/NdbAutoPtr.hpp>
|
||||
|
||||
#include "sql_base.h" // close_thread_tables
|
||||
#include "sql_table.h" // build_table_filename
|
||||
#include "table.h" // open_table_from_share
|
||||
#include "discover.h" // readfrm, writefrm
|
||||
#include "lock.h" // MYSQL_LOCK_IGNORE_FLUSH,
|
||||
// mysql_unlock_tables
|
||||
#include "sql_parse.h" // mysql_parse
|
||||
|
||||
#ifdef ndb_dynamite
|
||||
#undef assert
|
||||
#define assert(x) do { if(x) break; ::printf("%s %d: assert failed: %s\n", __FILE__, __LINE__, #x); ::fflush(stdout); ::signal(SIGABRT,SIG_DFL); ::abort(); ::kill(::getpid(),6); ::kill(::getpid(),9); } while (0)
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "sql_class.h" /* THD */
|
||||
|
||||
// Typedefs for long names
|
||||
typedef NdbDictionary::Object NDBOBJ;
|
||||
typedef NdbDictionary::Column NDBCOL;
|
||||
|
|
|
@ -22,7 +22,10 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "sql_class.h" // set_var.h: THD
|
||||
#include "my_global.h" // WITH_*
|
||||
#include "log.h" // sql_print_error
|
||||
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
#include <ndbapi/NdbApi.hpp>
|
||||
|
|
|
@ -25,6 +25,13 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "set_var.h" /* Item, Item_field */
|
||||
|
||||
typedef enum ndb_item_type {
|
||||
NDB_VALUE = 0, // Qualified more with Item::Type
|
||||
NDB_FIELD = 1, // Qualified from table definition
|
||||
|
|
|
@ -51,12 +51,14 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "sql_parse.h" // append_file_to_dir
|
||||
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
#include "ha_partition.h"
|
||||
|
||||
#include <mysql/plugin.h>
|
||||
#include "sql_table.h" // tablename_to_filename
|
||||
#include "key.h"
|
||||
#include "sql_plugin.h"
|
||||
|
||||
static const char *ha_par_ext= ".par";
|
||||
#ifdef NOT_USED
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
#include "sql_partition.h" /* part_id_range, partition_element */
|
||||
#include "queues.h" /* QUEUE */
|
||||
|
||||
enum partition_keywords
|
||||
{
|
||||
PKW_HASH= 0, PKW_RANGE, PKW_LIST, PKW_KEY, PKW_MAXVALUE, PKW_LINEAR,
|
||||
|
|
|
@ -23,8 +23,19 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "rpl_handler.h"
|
||||
#include "sql_cache.h" // query_cache, query_cache_*
|
||||
#include "key.h" // key_copy, key_unpack, key_cmp_if_same, key_cmp
|
||||
#include "sql_table.h" // build_table_filename
|
||||
#include "lock.h" // wait_if_global_read_lock,
|
||||
// start_waiting_global_read_lock
|
||||
#include "sql_parse.h" // check_stack_overrun
|
||||
#include "sql_acl.h" // SUPER_ACL
|
||||
#include "sql_base.h" // free_io_cache
|
||||
#include "discover.h" // writefrm
|
||||
#include "log_event.h" // *_rows_log_event
|
||||
#include "rpl_filter.h"
|
||||
#include <myisampack.h>
|
||||
#include "transaction.h"
|
||||
|
|
|
@ -22,6 +22,13 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
#include "sql_const.h"
|
||||
#include "mysqld.h" /* server_id */
|
||||
#include "sql_plugin.h" /* plugin_ref, st_plugin_int, plugin */
|
||||
#include "thr_lock.h" /* thr_lock_type, THR_LOCK_DATA */
|
||||
#include "sql_cache.h"
|
||||
#include "structs.h" /* SHOW_COMP_OPTION */
|
||||
|
||||
#include <my_handler.h>
|
||||
#include <ft_global.h>
|
||||
#include <keycache.h>
|
||||
|
@ -2173,4 +2180,15 @@ int ha_binlog_end(THD *thd);
|
|||
#define ha_binlog_wait(a) do {} while (0)
|
||||
#define ha_binlog_end(a) do {} while (0)
|
||||
#endif
|
||||
|
||||
const char *get_canonical_filename(handler *file, const char *path,
|
||||
char *tmp_path);
|
||||
bool mysql_xa_recover(THD *thd);
|
||||
|
||||
|
||||
inline const char *table_case_name(HA_CREATE_INFO *info, const char *name)
|
||||
{
|
||||
return ((lower_case_table_names == 2 && info->alias) ? info->alias : name);
|
||||
}
|
||||
|
||||
#endif /* HANDLER_INCLUDED */
|
||||
|
|
|
@ -23,5 +23,5 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "hash_filo.h"
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#pragma interface /* gcc class interface */
|
||||
#endif
|
||||
|
||||
#include "hash.h" /* my_hash_get_key, my_hash_free_key, HASH */
|
||||
#include "m_string.h" /* bzero */
|
||||
#include "mysqld.h" /* key_hash_filo_lock */
|
||||
|
||||
class hash_filo_element
|
||||
{
|
||||
hash_filo_element *next_used,*prev_used;
|
||||
|
|
|
@ -24,9 +24,18 @@
|
|||
doesn't resemble an IP address.
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "hostname.h"
|
||||
#include "my_global.h"
|
||||
#ifndef __WIN__
|
||||
#include <netdb.h> // getservbyname, servent
|
||||
#endif
|
||||
#include "hash_filo.h"
|
||||
#include <m_ctype.h>
|
||||
#include "log.h" // sql_print_warning,
|
||||
// sql_print_information
|
||||
#include "violite.h" // vio_getnameinfo,
|
||||
// vio_get_normalized_ip_string
|
||||
#ifdef __cplusplus
|
||||
extern "C" { // Because of SCO 3.2V4.2
|
||||
#endif
|
||||
|
|
30
sql/hostname.h
Normal file
30
sql/hostname.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef HOSTNAME_INCLUDED
|
||||
#define HOSTNAME_INCLUDED
|
||||
|
||||
#include "my_global.h" /* uint */
|
||||
|
||||
bool ip_to_hostname(struct sockaddr_storage *ip_storage,
|
||||
const char *ip_string,
|
||||
char **hostname, uint *connect_errors);
|
||||
void inc_host_errors(const char *ip_string);
|
||||
void reset_host_errors(const char *ip_string);
|
||||
bool hostname_cache_init();
|
||||
void hostname_cache_free();
|
||||
void hostname_cache_refresh(void);
|
||||
|
||||
#endif /* HOSTNAME_INCLUDED */
|
|
@ -21,7 +21,12 @@
|
|||
Init and dummy functions for interface with unireg
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "init.h"
|
||||
#include "my_sys.h"
|
||||
#include "mysqld.h" // abort_loop, ...
|
||||
#include "my_time.h" // my_init_time
|
||||
#include "unireg.h" // SPECIAL_SAME_DB_NAME
|
||||
#include <m_ctype.h>
|
||||
|
||||
void unireg_init(ulong options)
|
||||
|
|
24
sql/init.h
Normal file
24
sql/init.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef INIT_INCLUDED
|
||||
#define INIT_INCLUDED
|
||||
|
||||
#include "my_global.h" /* ulong */
|
||||
|
||||
void unireg_init(ulong options);
|
||||
void unireg_end(void) __attribute__((noreturn));
|
||||
|
||||
#endif /* INIT_INCLUDED */
|
17
sql/item.cc
17
sql/item.cc
|
@ -17,7 +17,9 @@
|
|||
#ifdef USE_PRAGMA_IMPLEMENTATION
|
||||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
#include "mysql_priv.h"
|
||||
#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h" // REQUIRED: for other includes
|
||||
#include <mysql.h>
|
||||
#include <m_ctype.h>
|
||||
#include "my_dir.h"
|
||||
|
@ -25,6 +27,19 @@
|
|||
#include "sp_head.h"
|
||||
#include "sql_trigger.h"
|
||||
#include "sql_select.h"
|
||||
#include "sql_show.h" // append_identifier
|
||||
#include "sql_view.h" // VIEW_ANY_SQL
|
||||
#include "sql_time.h" // str_to_datetime_with_warn,
|
||||
// make_truncated_value_warning
|
||||
#include "sql_acl.h" // get_column_grant,
|
||||
// SELECT_ACL, UPDATE_ACL,
|
||||
// INSERT_ACL,
|
||||
// check_grant_column
|
||||
#include "sql_base.h" // enum_resolution_type,
|
||||
// REPORT_EXCEPT_NOT_FOUND,
|
||||
// find_item_in_list,
|
||||
// RESOLVED_AGAINST_ALIAS, ...
|
||||
#include "log_event.h" // append_query_string
|
||||
|
||||
const String my_null_string("NULL", 4, default_charset_info);
|
||||
|
||||
|
|
24
sql/item.h
24
sql/item.h
|
@ -21,10 +21,18 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
#include "sql_priv.h" /* STRING_BUFFER_USUAL_SIZE */
|
||||
#include "unireg.h"
|
||||
#include "sql_const.h" /* RAND_TABLE_BIT, MAX_FIELD_NAME */
|
||||
#include "unireg.h" // REQUIRED: for other includes
|
||||
#include "thr_malloc.h" /* sql_calloc */
|
||||
#include "field.h" /* Derivation */
|
||||
|
||||
class Protocol;
|
||||
struct TABLE_LIST;
|
||||
void item_init(void); /* Init item functions */
|
||||
class Item_field;
|
||||
class user_var_entry;
|
||||
|
||||
/*
|
||||
"Declared Type Collation"
|
||||
|
@ -2689,6 +2697,7 @@ public:
|
|||
#include "item_timefunc.h"
|
||||
#include "item_subselect.h"
|
||||
#include "item_xmlfunc.h"
|
||||
#include "item_create.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -3021,18 +3030,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
We need this two enums here instead of sql_lex.h because
|
||||
at least one of them is used by Item_trigger_field interface.
|
||||
|
||||
Time when trigger is invoked (i.e. before or after row actually
|
||||
inserted/updated/deleted).
|
||||
*/
|
||||
enum trg_action_time_type
|
||||
{
|
||||
TRG_ACTION_BEFORE= 0, TRG_ACTION_AFTER= 1, TRG_ACTION_MAX
|
||||
};
|
||||
|
||||
class Table_triggers_list;
|
||||
|
||||
/*
|
||||
|
@ -3418,4 +3415,7 @@ extern Cached_item *new_Cached_item(THD *thd, Item *item);
|
|||
extern Item_result item_cmp_type(Item_result a,Item_result b);
|
||||
extern void resolve_const_item(THD *thd, Item **ref, Item *cmp_item);
|
||||
extern int stored_field_cmp_to_item(THD *thd, Field *field, Item *item);
|
||||
|
||||
extern const String my_null_string;
|
||||
|
||||
#endif /* ITEM_INCLUDED */
|
||||
|
|
|
@ -21,7 +21,14 @@
|
|||
Buffers to save and compare item values
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // THD
|
||||
#include "set_var.h" // Cached_item, Cached_item_field, ...
|
||||
|
||||
/**
|
||||
Create right type of Cached_item for an item.
|
||||
|
|
|
@ -25,9 +25,11 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include <m_ctype.h>
|
||||
#include "sql_select.h"
|
||||
#include "sql_parse.h" // check_stack_overrun
|
||||
#include "sql_time.h" // make_truncated_value_warning
|
||||
|
||||
static bool convert_constant_item(THD *, Item_field *, Item **);
|
||||
static longlong
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
#include "thr_malloc.h" /* sql_calloc */
|
||||
#include "item_func.h" /* Item_int_func, Item_bool_func */
|
||||
|
||||
extern Item_result item_cmp_type(Item_result a,Item_result b);
|
||||
class Item_bool_func2;
|
||||
class Arg_comparator;
|
||||
|
@ -1760,8 +1763,26 @@ inline Item *and_conds(Item *a, Item *b)
|
|||
return new Item_cond_and(a, b);
|
||||
}
|
||||
|
||||
|
||||
Item *and_expressions(Item *a, Item *b, Item **org_item);
|
||||
|
||||
longlong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
|
||||
Item *warn_item, bool *is_null);
|
||||
|
||||
|
||||
bool get_mysql_time_from_str(THD *thd, String *str, timestamp_type warn_type,
|
||||
const char *warn_name, MYSQL_TIME *l_time);
|
||||
|
||||
/*
|
||||
These need definitions from this file but the variables are defined
|
||||
in mysqld.h. The variables really belong in this component, but for
|
||||
the time being we leave them in mysqld.cc to avoid merge problems.
|
||||
*/
|
||||
extern Eq_creator eq_creator;
|
||||
extern Ne_creator ne_creator;
|
||||
extern Gt_creator gt_creator;
|
||||
extern Lt_creator lt_creator;
|
||||
extern Ge_creator ge_creator;
|
||||
extern Le_creator le_creator;
|
||||
|
||||
#endif /* ITEM_CMPFUNC_INCLUDED */
|
||||
|
|
|
@ -20,8 +20,14 @@
|
|||
Functions to create an item. Used by sql_yac.yy
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "item_create.h"
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // set_var.h: THD
|
||||
#include "set_var.h"
|
||||
#include "sp_head.h"
|
||||
#include "sp.h"
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#ifndef ITEM_CREATE_H
|
||||
#define ITEM_CREATE_H
|
||||
|
||||
typedef struct st_udf_func udf_func;
|
||||
|
||||
/**
|
||||
Public function builder interface.
|
||||
The parser (sql/sql_yacc.yy) uses a factory / builder pattern to
|
||||
|
@ -163,5 +165,9 @@ Item *
|
|||
create_func_cast(THD *thd, Item *a, Cast_target cast_type,
|
||||
const char *len, const char *dec,
|
||||
CHARSET_INFO *cs);
|
||||
|
||||
int item_create_init();
|
||||
void item_create_cleanup();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,8 +25,21 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // set_var.h: THD
|
||||
#include "set_var.h"
|
||||
#include "slave.h" // for wait_for_master_pos
|
||||
#include "sql_show.h" // append_identifier
|
||||
#include "strfunc.h" // find_type
|
||||
#include "sql_parse.h" // is_update_query
|
||||
#include "sql_acl.h" // EXECUTE_ACL
|
||||
#include "mysqld.h" // LOCK_uuid_generator
|
||||
#include "rpl_mi.h"
|
||||
#include <m_ctype.h>
|
||||
#include <hash.h>
|
||||
|
|
|
@ -1797,4 +1797,14 @@ public:
|
|||
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
|
||||
};
|
||||
|
||||
Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name,
|
||||
LEX_STRING component);
|
||||
extern bool check_reserved_words(LEX_STRING *name);
|
||||
extern enum_field_types agg_field_type(Item **items, uint nitems);
|
||||
double my_double_round(double value, longlong dec, bool dec_unsigned,
|
||||
bool truncate);
|
||||
bool eval_const_cond(COND *cond);
|
||||
|
||||
extern bool volatile mqh_used;
|
||||
|
||||
#endif /* ITEM_FUNC_INCLUDED */
|
||||
|
|
|
@ -25,7 +25,14 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // THD, set_var.h: THD
|
||||
#include "set_var.h"
|
||||
#ifdef HAVE_SPATIAL
|
||||
#include <m_ctype.h>
|
||||
|
||||
|
|
|
@ -13,7 +13,14 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // THD, set_var.h: THD
|
||||
#include "set_var.h"
|
||||
|
||||
/**
|
||||
Row items used for comparing rows and IN operations on rows:
|
||||
|
|
|
@ -29,7 +29,22 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "my_global.h" // HAVE_*
|
||||
|
||||
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // set_var.h: THD
|
||||
#include "set_var.h"
|
||||
#include "mysqld.h" // LOCK_uuid_generator
|
||||
#include "sql_acl.h" // SUPER_ACL
|
||||
#include "des_key_file.h" // st_des_keyschedule, st_des_keyblock
|
||||
#include "password.h" // my_make_scrambled_password,
|
||||
// my_make_scrambled_password_323
|
||||
#include <m_ctype.h>
|
||||
#include "my_md5.h"
|
||||
#include "sha1.h"
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
class MY_LOCALE;
|
||||
|
||||
class Item_str_func :public Item_func
|
||||
{
|
||||
public:
|
||||
|
@ -878,4 +880,6 @@ public:
|
|||
String *val_str(String *);
|
||||
};
|
||||
|
||||
extern String my_empty_string;
|
||||
|
||||
#endif /* ITEM_STRFUNC_INCLUDED */
|
||||
|
|
|
@ -28,8 +28,16 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // set_var.h: THD
|
||||
#include "set_var.h"
|
||||
#include "sql_select.h"
|
||||
#include "sql_parse.h" // check_stack_overrun
|
||||
|
||||
inline Item * and_items(Item* cond, Item *item)
|
||||
{
|
||||
|
|
|
@ -28,6 +28,15 @@ class JOIN;
|
|||
class select_subselect;
|
||||
class subselect_engine;
|
||||
class Item_bool_func2;
|
||||
class Comp_creator;
|
||||
|
||||
typedef class st_select_lex SELECT_LEX;
|
||||
|
||||
/**
|
||||
Convenience typedef used in this file, and further used by any files
|
||||
including this file.
|
||||
*/
|
||||
typedef Comp_creator* (*chooser_compare_func_creator)(bool invert);
|
||||
|
||||
/* base class for subselects */
|
||||
|
||||
|
@ -573,6 +582,15 @@ public:
|
|||
virtual void print (String *str, enum_query_type query_type);
|
||||
};
|
||||
|
||||
/*
|
||||
This function is actually defined in sql_parse.cc, but it depends on
|
||||
chooser_compare_func_creator defined in this file.
|
||||
*/
|
||||
Item * all_any_subquery_creator(Item *left_expr,
|
||||
chooser_compare_func_creator cmp,
|
||||
bool all,
|
||||
SELECT_LEX *select_lex);
|
||||
|
||||
|
||||
inline bool Item_subselect::is_evaluated() const
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
#include "sql_select.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#endif
|
||||
|
||||
#include <my_tree.h>
|
||||
#include "sql_udf.h" /* udf_handler */
|
||||
|
||||
class Item_sum;
|
||||
class Aggregator_distinct;
|
||||
|
|
|
@ -28,7 +28,28 @@
|
|||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_priv.h"
|
||||
/*
|
||||
It is necessary to include set_var.h instead of item.h because there
|
||||
are dependencies on include order for set_var.h and item.h. This
|
||||
will be resolved later.
|
||||
*/
|
||||
#include "sql_class.h" // set_var.h: THD
|
||||
#include "set_var.h"
|
||||
#include "sql_locale.h" // MY_LOCALE my_locale_en_US
|
||||
#include "strfunc.h" // check_word
|
||||
#include "sql_time.h" // make_truncated_value_warning,
|
||||
// make_time, get_date_from_daynr,
|
||||
// calc_weekday, calc_week,
|
||||
// convert_month_to_period,
|
||||
// convert_period_to_month,
|
||||
// TIME_to_timestamp, make_date,
|
||||
// calc_time_diff,
|
||||
// calc_time_from_sec,
|
||||
// known_date_time_format,
|
||||
// get_date_time_format_str
|
||||
#include "tztime.h" // struct Time_zone
|
||||
#include "sql_class.h" // THD
|
||||
#include <m_ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
class MY_LOCALE;
|
||||
|
||||
enum date_time_format_types
|
||||
{
|
||||
TIME_ONLY= 0, TIME_MICROSECOND, DATE_ONLY, DATE_TIME, DATE_TIME_MICROSECOND
|
||||
|
@ -1066,4 +1068,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time,
|
||||
timestamp_type type, String *str);
|
||||
|
||||
#endif /* ITEM_TIMEFUNC_INCLUDED */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue