summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-06-06 21:32:29 +0200
committerSergei Golubchik <sergii@pisem.net>2013-06-06 21:32:29 +0200
commit72ba95873a6d99def07a4bfecda44fb942165142 (patch)
tree4bcb11afc568c4894f4cb109d57c14968320a58b /include
parentfab9a55d077b4f2a511b273d5f51272f1e3dc1ff (diff)
parent4749d40c635634e25e07d28ce1a04e9263bcc375 (diff)
downloadmariadb-git-72ba95873a6d99def07a4bfecda44fb942165142.tar.gz
10.0-base merge
(without InnoDB - all InnoDB changes were ignored)
Diffstat (limited to 'include')
-rw-r--r--include/atomic/x86-gcc.h6
-rw-r--r--include/base64.h3
-rw-r--r--include/ft_global.h2
-rw-r--r--include/m_ctype.h5
-rw-r--r--include/m_string.h11
-rw-r--r--include/my_global.h2
-rw-r--r--include/my_md5.h3
-rw-r--r--include/my_pthread.h6
-rw-r--r--include/my_sys.h3
-rw-r--r--include/my_user.h3
-rw-r--r--include/my_xml.h3
-rw-r--r--include/myisamchk.h20
-rw-r--r--include/myisampack.h2
-rw-r--r--include/mysql.h3
-rw-r--r--include/mysql/plugin_audit.h46
-rw-r--r--include/mysql/plugin_audit.h.pp21
-rw-r--r--include/mysql/service_my_snprintf.h2
-rw-r--r--include/mysql_com.h2
-rw-r--r--include/mysql_time.h3
-rw-r--r--include/mysql_version.h.in3
-rw-r--r--include/thread_pool_priv.h2
-rw-r--r--include/welcome_copyright_notice.h2
22 files changed, 121 insertions, 32 deletions
diff --git a/include/atomic/x86-gcc.h b/include/atomic/x86-gcc.h
index 2238347d419..173e32e790c 100644
--- a/include/atomic/x86-gcc.h
+++ b/include/atomic/x86-gcc.h
@@ -124,10 +124,10 @@
asm volatile ("push %%ebx;" \
"movl (%%ecx), %%ebx;" \
"movl 4(%%ecx), %%ecx;" \
- LOCK_prefix "; cmpxchg8b %0;" \
+ LOCK_prefix "; cmpxchg8b (%%esi);" \
"setz %2; pop %%ebx" \
- : "=m" (*a), "+A" (*cmp), "=c" (ret) \
- : "c" (&set), "m" (*a) \
+ : "+S" (a), "+A" (*cmp), "=c" (ret) \
+ : "c" (&set) \
: "memory", "esp")
#endif
diff --git a/include/base64.h b/include/base64.h
index 4ac0aa72ad8..e19da8762cb 100644
--- a/include/base64.h
+++ b/include/base64.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2003 MySQL AB
+/* Copyright (c) 2003-2006 MySQL AB
+ Use is subject to license terms
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
diff --git a/include/ft_global.h b/include/ft_global.h
index 8a1069d6e62..73726018d0a 100644
--- a/include/ft_global.h
+++ b/include/ft_global.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2007 MySQL AB, 2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000-2005, 2007 MySQL AB, 2009 Sun Microsystems, Inc.
Use is subject to license terms.
This program is free software; you can redistribute it and/or modify
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 7ffa8022c85..95b520e4ee9 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -1,5 +1,4 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
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
@@ -172,6 +171,8 @@ enum my_lex_states
struct charset_info_st;
+extern int (*my_string_stack_guard)(int);
+
/* See strings/CHARSET_INFO.txt for information about this structure */
struct my_collation_handler_st
{
diff --git a/include/m_string.h b/include/m_string.h
index 9efa0376942..1f59fd06084 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2012, Oracle and/or its affiliates.
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
@@ -108,6 +108,15 @@ extern char *strcend(const char *, pchar);
extern char *strfill(char * s,size_t len,pchar fill);
extern char *strmake(char *dst,const char *src,size_t length);
+#if !defined(__GNUC__) || (__GNUC__ < 4)
+#define strmake_buf(D,S) strmake(D, S, sizeof(D) - 1)
+#else
+#define strmake_buf(D,S) ({ \
+ compile_time_assert(sizeof(D) != sizeof(char*)); \
+ strmake(D, S, sizeof(D) - 1); \
+ })
+#endif
+
#ifndef strmov
extern char *strmov(char *dst,const char *src);
#endif
diff --git a/include/my_global.h b/include/my_global.h
index 83e796f107f..02ae023fed2 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1420,6 +1420,7 @@ static inline char *dlerror(void)
#endif
/* Provide __func__ macro definition for platforms that miss it. */
+#if !defined (__func__)
#if __STDC_VERSION__ < 199901L
# if __GNUC__ >= 2
# define __func__ __FUNCTION__
@@ -1437,6 +1438,7 @@ static inline char *dlerror(void)
#else
# define __func__ "<unknown>"
#endif
+#endif /* !defined(__func__) */
#ifndef HAVE_RINT
/**
diff --git a/include/my_md5.h b/include/my_md5.h
index 4f90541067b..b8633b7b1ab 100644
--- a/include/my_md5.h
+++ b/include/my_md5.h
@@ -1,7 +1,8 @@
#ifndef MY_MD5_INCLUDED
#define MY_MD5_INCLUDED
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2001, 2007 MySQL AB, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms
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
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 8c16a112eac..9e39c6565dc 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -119,7 +119,6 @@ int pthread_cancel(pthread_t thread);
#define HAVE_LOCALTIME_R 1
#define _REENTRANT 1
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
-#define PTHREAD_STACK_MIN 65536
#undef SAFE_MUTEX /* This will cause conflicts */
#define pthread_key(T,V) DWORD V
@@ -830,6 +829,11 @@ extern uint thd_lib_detected;
#define mysql_mutex_record_order(A,B) do { } while(0)
#endif
+/* At least Windows and NetBSD do not have this definition */
+#ifndef PTHREAD_STACK_MIN
+#define PTHREAD_STACK_MIN 65536
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/include/my_sys.h b/include/my_sys.h
index e2132815cdd..24a38656161 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000-2003 MySQL AB
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2013, Monty Program 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
diff --git a/include/my_user.h b/include/my_user.h
index 44eebf1551d..067425a2b47 100644
--- a/include/my_user.h
+++ b/include/my_user.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2005 MySQL AB
+/* Copyright (c) 2005-2007 MySQL AB
+ Use is subject to license terms
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
diff --git a/include/my_xml.h b/include/my_xml.h
index 6a453ee90be..e97232c7039 100644
--- a/include/my_xml.h
+++ b/include/my_xml.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2002, 2003, 2005, 2007 MySQL AB
+ Use is subject to license terms
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
diff --git a/include/myisamchk.h b/include/myisamchk.h
index 152467db547..0a30615c629 100644
--- a/include/myisamchk.h
+++ b/include/myisamchk.h
@@ -31,27 +31,27 @@
#define T_AUTO_REPAIR 2 /* QQ to be removed */
#define T_BACKUP_DATA 4
#define T_CALC_CHECKSUM 8
-#define T_CHECK 16 /* QQ to be removed */
-#define T_CHECK_ONLY_CHANGED 32 /* QQ to be removed */
+#define T_CHECK 16
+#define T_CHECK_ONLY_CHANGED 32
#define T_CREATE_MISSING_KEYS 64
#define T_DESCRIPT 128
#define T_DONT_CHECK_CHECKSUM 256
#define T_EXTEND 512
-#define T_FAST (1L << 10) /* QQ to be removed */
-#define T_FORCE_CREATE (1L << 11) /* QQ to be removed */
+#define T_FAST (1L << 10)
+#define T_FORCE_CREATE (1L << 11)
#define T_FORCE_UNIQUENESS (1L << 12)
#define T_INFO (1L << 13)
#define T_MEDIUM (1L << 14)
-#define T_QUICK (1L << 15) /* QQ to be removed */
-#define T_READONLY (1L << 16) /* QQ to be removed */
+#define T_QUICK (1L << 15)
+#define T_READONLY (1L << 16)
#define T_REP (1L << 17)
-#define T_REP_BY_SORT (1L << 18) /* QQ to be removed */
-#define T_REP_PARALLEL (1L << 19) /* QQ to be removed */
+#define T_REP_BY_SORT (1L << 18)
+#define T_REP_PARALLEL (1L << 19)
#define T_RETRY_WITHOUT_QUICK (1L << 20)
#define T_SAFE_REPAIR (1L << 21)
#define T_SILENT (1L << 22)
-#define T_SORT_INDEX (1L << 23) /* QQ to be removed */
-#define T_SORT_RECORDS (1L << 24) /* QQ to be removed */
+#define T_SORT_INDEX (1L << 23)
+#define T_SORT_RECORDS (1L << 24)
#define T_STATISTICS (1L << 25)
#define T_UNPACK (1L << 26)
#define T_UPDATE_STATE (1L << 27)
diff --git a/include/myisampack.h b/include/myisampack.h
index a065de378d8..0795455dc3e 100644
--- a/include/myisampack.h
+++ b/include/myisampack.h
@@ -1,7 +1,7 @@
#ifndef MYISAMPACK_INCLUDED
#define MYISAMPACK_INCLUDED
-/* Copyright (c) 2000-2002, 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000-2002, 2004 MySQL AB, 2009 Sun Microsystems, Inc.
Use is subject to license terms.
This program is free software; you can redistribute it and/or modify
diff --git a/include/mysql.h b/include/mysql.h
index 69fc8005d61..b070d50e966 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -1,5 +1,6 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2012, Oracle and/or its affiliates.
+ Copyright (c) 2012, Monty Program 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
diff --git a/include/mysql/plugin_audit.h b/include/mysql/plugin_audit.h
index eee32a9e523..86b6dea5668 100644
--- a/include/mysql/plugin_audit.h
+++ b/include/mysql/plugin_audit.h
@@ -25,7 +25,7 @@
#define MYSQL_AUDIT_CLASS_MASK_SIZE 1
-#define MYSQL_AUDIT_INTERFACE_VERSION 0x0300
+#define MYSQL_AUDIT_INTERFACE_VERSION 0x0301
/*************************************************************************
@@ -97,6 +97,50 @@ struct mysql_event_connection
unsigned int database_length;
};
+/*
+ AUDIT CLASS : TABLE
+
+ LOCK occurs when a connection "locks" (this does not necessarily mean a table
+ lock and also happens for row-locking engines) the table at the beginning of
+ a statement. This event is generated at the beginning of every statement for
+ every affected table, unless there's a LOCK TABLES statement in effect (in
+ which case it is generated once for LOCK TABLES and then is suppressed until
+ the tables are unlocked).
+
+ CREATE/DROP/RENAME occur when a table is created, dropped, or renamed.
+*/
+
+#define MYSQL_AUDIT_TABLE_CLASS 15
+#define MYSQL_AUDIT_TABLE_CLASSMASK (1 << MYSQL_AUDIT_TABLE_CLASS)
+#define MYSQL_AUDIT_TABLE_LOCK 0
+#define MYSQL_AUDIT_TABLE_CREATE 1
+#define MYSQL_AUDIT_TABLE_DROP 2
+#define MYSQL_AUDIT_TABLE_RENAME 3
+#define MYSQL_AUDIT_TABLE_ALTER 4
+
+struct mysql_event_table
+{
+ unsigned int event_subclass;
+ unsigned long thread_id;
+ const char *user;
+ const char *priv_user;
+ const char *priv_host;
+ const char *external_user;
+ const char *proxy_user;
+ const char *host;
+ const char *ip;
+ const char *database;
+ unsigned int database_length;
+ const char *table;
+ unsigned int table_length;
+ /* for MYSQL_AUDIT_TABLE_LOCK, true if read-only, false if read/write */
+ int read_only;
+ /* for MYSQL_AUDIT_TABLE_RENAME */
+ const char *new_database;
+ unsigned int new_database_length;
+ const char *new_table;
+ unsigned int new_table_length;
+};
/*************************************************************************
Here we define the descriptor structure, that is referred from
diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp
index 1c4b46c2a01..507399d9393 100644
--- a/include/mysql/plugin_audit.h.pp
+++ b/include/mysql/plugin_audit.h.pp
@@ -272,6 +272,27 @@ struct mysql_event_connection
const char *database;
unsigned int database_length;
};
+struct mysql_event_table
+{
+ unsigned int event_subclass;
+ unsigned long thread_id;
+ const char *user;
+ const char *priv_user;
+ const char *priv_host;
+ const char *external_user;
+ const char *proxy_user;
+ const char *host;
+ const char *ip;
+ const char *database;
+ unsigned int database_length;
+ const char *table;
+ unsigned int table_length;
+ int read_only;
+ const char *new_database;
+ unsigned int new_database_length;
+ const char *new_table;
+ unsigned int new_table_length;
+};
struct st_mysql_audit
{
int interface_version;
diff --git a/include/mysql/service_my_snprintf.h b/include/mysql/service_my_snprintf.h
index a7fd3e8a2c6..d4ce97076e6 100644
--- a/include/mysql/service_my_snprintf.h
+++ b/include/mysql/service_my_snprintf.h
@@ -1,5 +1,5 @@
#ifndef MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
-/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2009, 2012, 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
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 229f54f68e1..0573bbe5f80 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -24,7 +24,7 @@
#define HOSTNAME_LENGTH 60
#define SYSTEM_CHARSET_MBMAXLEN 3
#define NAME_CHAR_LEN 64 /* Field/table name length */
-#define USERNAME_CHAR_LENGTH 16
+#define USERNAME_CHAR_LENGTH 128
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
diff --git a/include/mysql_time.h b/include/mysql_time.h
index 0a3f17a81fb..c92267232a1 100644
--- a/include/mysql_time.h
+++ b/include/mysql_time.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (c) 2004, 2006 MySQL AB
+ Use is subject to license terms
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
diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in
index 18c61040c22..56b2fe50ec0 100644
--- a/include/mysql_version.h.in
+++ b/include/mysql_version.h.in
@@ -1,4 +1,5 @@
-/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
+/* Copyright (c) 1996, 1999-2004, 2007 MySQL AB
+ Use is subject to license terms
This file is public domain and comes with NO WARRANTY of any kind */
/* Version numbers for protocol & mysqld */
diff --git a/include/thread_pool_priv.h b/include/thread_pool_priv.h
index 84c7faa2e2b..9a9c65af6da 100644
--- a/include/thread_pool_priv.h
+++ b/include/thread_pool_priv.h
@@ -1,6 +1,6 @@
#error don't use
/*
- Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2012, 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
diff --git a/include/welcome_copyright_notice.h b/include/welcome_copyright_notice.h
index 9878ab1c07d..302f623e377 100644
--- a/include/welcome_copyright_notice.h
+++ b/include/welcome_copyright_notice.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2013, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2012, Oracle and/or its affiliates.
Copyright (c) 2011, 2012, Monty Program Ab
This program is free software; you can redistribute it and/or modify