summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-04-27 13:58:21 +0400
committerAlexander Nozdrin <alik@sun.com>2010-04-27 13:58:21 +0400
commitd328d5be33cddff7dfcc736ecc993f11560f8152 (patch)
tree6fc830df498046ca29b2381fb809726faeb04f52 /include
parent5575d724cf1e40c467ab0eab934ce8846b452a9a (diff)
parent0c8c4a7133f955603029b3bc31e45b5ef02516ca (diff)
downloadmariadb-git-d328d5be33cddff7dfcc736ecc993f11560f8152.tar.gz
Manual merge from mysql-trunk.
Conflicts: - mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am2
-rw-r--r--include/my_global.h17
-rw-r--r--include/mysql/innodb_priv.h4
-rw-r--r--include/mysql/plugin_audit.h7
-rw-r--r--include/mysql_embed.h2
-rw-r--r--include/sha2.h72
-rw-r--r--include/sslopt-case.h2
-rw-r--r--include/sslopt-longopts.h2
-rw-r--r--include/sslopt-vars.h2
-rw-r--r--include/violite.h2
10 files changed, 99 insertions, 13 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index c60965fd385..5ede6d7591f 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -37,7 +37,7 @@ noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.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 \
+ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h sha2.h \
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
my_handler.h my_time.h service_versions.h \
diff --git a/include/my_global.h b/include/my_global.h
index 540fabee6dd..6558e402586 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -18,6 +18,11 @@
#ifndef _global_h
#define _global_h
+/* Client library users on Windows need this macro defined here. */
+#if !defined(__WIN__) && defined(_WIN32)
+#define __WIN__
+#endif
+
/*
InnoDB depends on some MySQL internals which other plugins should not
need. This is because of InnoDB's foreign key support, "safe" binlog
@@ -1089,10 +1094,14 @@ typedef long long my_ptrdiff_t;
#define HUGE_PTR
#endif
#endif
-#if defined(__IBMC__) || defined(__IBMCPP__)
-/* This was _System _Export but caused a lot of warnings on _AIX43 */
-#define STDCALL
-#elif !defined( STDCALL)
+
+#ifdef STDCALL
+#undef STDCALL
+#endif
+
+#ifdef _WIN32
+#define STDCALL __stdcall
+#else
#define STDCALL
#endif
diff --git a/include/mysql/innodb_priv.h b/include/mysql/innodb_priv.h
index 56d8434f9b0..993dad7cf99 100644
--- a/include/mysql/innodb_priv.h
+++ b/include/mysql/innodb_priv.h
@@ -24,12 +24,14 @@ 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 schema_table_store_record(THD *thd, TABLE *table);
+void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);
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 */
diff --git a/include/mysql/plugin_audit.h b/include/mysql/plugin_audit.h
index 8932767075d..41505da64af 100644
--- a/include/mysql/plugin_audit.h
+++ b/include/mysql/plugin_audit.h
@@ -24,7 +24,7 @@
#define MYSQL_AUDIT_CLASS_MASK_SIZE 1
-#define MYSQL_AUDIT_INTERFACE_VERSION 0x0100
+#define MYSQL_AUDIT_INTERFACE_VERSION 0x0200
/*
The first word in every event class struct indicates the specific
@@ -32,7 +32,7 @@
*/
struct mysql_event
{
- int event_class;
+ unsigned int event_class;
};
@@ -52,7 +52,8 @@ struct mysql_event
struct mysql_event_general
{
- int event_class;
+ unsigned int event_class;
+ unsigned int event_subclass;
int general_error_code;
unsigned long general_thread_id;
const char *general_user;
diff --git a/include/mysql_embed.h b/include/mysql_embed.h
index 0e5a360585e..b26b723381d 100644
--- a/include/mysql_embed.h
+++ b/include/mysql_embed.h
@@ -24,7 +24,7 @@
/* 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_DLOPEN /* No udf functions */
#undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
diff --git a/include/sha2.h b/include/sha2.h
new file mode 100644
index 00000000000..e67a4100ff2
--- /dev/null
+++ b/include/sha2.h
@@ -0,0 +1,72 @@
+/* Copyright (C) 2007 MySQL AB
+
+ 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 included_sha2_h
+#define included_sha2_h
+
+#include <my_config.h>
+
+#if defined(HAVE_YASSL) || defined(HAVE_OPENSSL)
+
+# ifdef HAVE_STDDEF_H
+# include <stddef.h>
+# endif
+
+# ifndef HAVE_YASSL
+# include <openssl/sha.h>
+
+# else
+
+#include "../extra/yassl/taocrypt/include/sha.hpp"
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+#ifndef SHA512_DIGEST_LENGTH
+#define SHA512_DIGEST_LENGTH TaoCrypt::SHA512::DIGEST_SIZE
+#endif
+
+#ifndef SHA384_DIGEST_LENGTH
+#define SHA384_DIGEST_LENGTH TaoCrypt::SHA384::DIGEST_SIZE
+#endif
+
+#ifndef SHA256_DIGEST_LENGTH
+#define SHA256_DIGEST_LENGTH TaoCrypt::SHA256::DIGEST_SIZE
+#endif
+
+#ifndef SHA224_DIGEST_LENGTH
+#define SHA224_DIGEST_LENGTH TaoCrypt::SHA224::DIGEST_SIZE
+#endif
+
+#define GEN_YASSL_SHA2_BRIDGE(size) \
+unsigned char* SHA##size(const unsigned char *input_ptr, size_t input_length, \
+ char unsigned *output_ptr);
+
+GEN_YASSL_SHA2_BRIDGE(512);
+GEN_YASSL_SHA2_BRIDGE(384);
+GEN_YASSL_SHA2_BRIDGE(256);
+GEN_YASSL_SHA2_BRIDGE(224);
+
+#undef GEN_YASSL_SHA2_BRIDGE
+
+# ifdef __cplusplus
+}
+# endif
+
+# endif /* HAVE_YASSL */
+
+#endif /* HAVE_OPENSSL || HAVE_YASSL */
+#endif /* included_sha2_h */
diff --git a/include/sslopt-case.h b/include/sslopt-case.h
index ce46cf65cc9..3b64a225fe2 100644
--- a/include/sslopt-case.h
+++ b/include/sslopt-case.h
@@ -16,7 +16,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef HAVE_OPENSSL
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
case OPT_SSL_KEY:
case OPT_SSL_CERT:
case OPT_SSL_CA:
diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h
index b98e72e298e..151287e1718 100644
--- a/include/sslopt-longopts.h
+++ b/include/sslopt-longopts.h
@@ -16,7 +16,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef HAVE_OPENSSL
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
{"ssl", OPT_SSL_SSL,
"Enable SSL for connection (automatically enabled with other flags).",
diff --git a/include/sslopt-vars.h b/include/sslopt-vars.h
index 4493fbc59ab..d0eec3b6d74 100644
--- a/include/sslopt-vars.h
+++ b/include/sslopt-vars.h
@@ -16,7 +16,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef HAVE_OPENSSL
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
#ifdef SSL_VARS_NOT_STATIC
#define SSL_STATIC
#else
diff --git a/include/violite.h b/include/violite.h
index 904c383d64a..05ceaa272c1 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -118,6 +118,7 @@ typedef my_socket YASSL_SOCKET_T;
#include <openssl/ssl.h>
#include <openssl/err.h>
+#ifndef EMBEDDED_LIBRARY
enum enum_ssl_init_error
{
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
@@ -143,6 +144,7 @@ struct st_VioSSLFd
const char *ca_file,const char *ca_path,
const char *cipher, enum enum_ssl_init_error* error);
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
+#endif /* ! EMBEDDED_LIBRARY */
#endif /* HAVE_OPENSSL */
void vio_end(void);