summaryrefslogtreecommitdiff
path: root/sql/sql_const.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_const.h')
-rw-r--r--sql/sql_const.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/sql/sql_const.h b/sql/sql_const.h
index e8385b537a8..c37d8dd68f7 100644
--- a/sql/sql_const.h
+++ b/sql/sql_const.h
@@ -17,12 +17,14 @@
@file
File containing constants that can be used throughout the server.
- @note This file shall not contain any includes of any kinds.
+ @note This file shall not contain or include any declarations of any kinds.
*/
#ifndef SQL_CONST_INCLUDED
#define SQL_CONST_INCLUDED
+#include <mysql_version.h>
+
#define LIBLEN FN_REFLEN-FN_LEN /* Max l{ngd p} dev */
/* extra 4+4 bytes for slave tmp tables */
#define MAX_DBKEY_LENGTH (NAME_LEN*2+1+1+4+4)
@@ -38,8 +40,10 @@
#define MAX_REFLENGTH 4 /* Max length for record ref */
#endif
#define MAX_HOSTNAME 61 /* len+1 in mysql.user */
+#define MAX_CONNECTION_NAME NAME_LEN
#define MAX_MBWIDTH 3 /* Max multibyte sequence */
+#define MAX_FILENAME_MBWIDTH 5
#define MAX_FIELD_CHARLENGTH 255
/*
In MAX_FIELD_VARCHARLENGTH we reserve extra bytes for the overhead:
@@ -78,7 +82,7 @@
RAND_TABLE_BIT)
#define CONNECT_STRING_MAXLEN 65535 /* stored in 2 bytes in .frm */
#define MAX_FIELDS 4096 /* Limit in the .frm file */
-#define MAX_PARTITIONS 1024
+#define MAX_PARTITIONS 8192
#define MAX_SELECT_NESTING (sizeof(nesting_map)*8-1)
@@ -87,7 +91,6 @@
/* Some portable defines */
-#define portable_sizeof_char_ptr 8
#define STRING_BUFFER_USUAL_SIZE 80
/* Memory allocated when parsing a statement / saving a statement */
@@ -139,6 +142,13 @@
*/
#define TABLE_DEF_CACHE_MIN 400
+/**
+ Maximum number of connections default value.
+ 151 is larger than Apache's default max children,
+ to avoid "too many connections" error in a common setup.
+*/
+#define MAX_CONNECTIONS_DEFAULT 151
+
/*
Stack reservation.
Feel free to raise this by the smallest amount you can to get the
@@ -146,7 +156,7 @@
*/
#define STACK_MIN_SIZE 16000 // Abort if less stack during eval.
-#define STACK_MIN_SIZE_FOR_OPEN 1024*80
+#define STACK_MIN_SIZE_FOR_OPEN (1024*80)
#define STACK_BUFF_ALLOC 352 ///< For stack overrun checks
#ifndef MYSQLD_NET_RETRY_COUNT
#define MYSQLD_NET_RETRY_COUNT 10 ///< Abort read after this many int.
@@ -242,8 +252,8 @@
#define DEFAULT_CONCURRENCY 10
#define DELAYED_LIMIT 100 /**< pause after xxx inserts */
#define DELAYED_QUEUE_SIZE 1000
-#define DELAYED_WAIT_TIMEOUT 5*60 /**< Wait for delayed insert */
-#define MAX_CONNECT_ERRORS 10 ///< errors before disabling host
+#define DELAYED_WAIT_TIMEOUT (5*60) /**< Wait for delayed insert */
+#define MAX_CONNECT_ERRORS 100 ///< errors before disabling host
#define LONG_TIMEOUT ((ulong) 3600L*24L*365L)