Commit a588622a authored by ingo@mysql.com's avatar ingo@mysql.com

Merge mysql.com:/home/mydev/mysql-5.0

into  mysql.com:/home/mydev/mysql-5.0-bug10932
parents 56e35734 6b18dbef
......@@ -693,6 +693,27 @@ dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_BIG_TABLES SECTION
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_MAX_INDEXES
dnl Sets MAX_INDEXES
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_MAX_INDEXES], [
AC_ARG_WITH([max-indexes],
[
--with-max-indexes=\# Sets the maximum number of indexes per table, default 64],
[max_indexes="$withval"],
[max_indexes=64])
AC_MSG_CHECKING([max indexes per table])
AC_DEFINE_UNQUOTED([MAX_INDEXES], [$max_indexes],
[Maximum number of indexes per table])
AC_MSG_RESULT([$max_indexes])
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_MAX_INDEXES SECTION
dnl ---------------------------------------------------------------------------
dnl MYSQL_NEEDS_MYSYS_NEW
AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW],
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_use_mysys_new,
......
......@@ -2413,6 +2413,7 @@ AC_SUBST(readline_link)
AC_SUBST(readline_h_ln_cmd)
MYSQL_CHECK_BIG_TABLES
MYSQL_CHECK_MAX_INDEXES
MYSQL_CHECK_BDB
MYSQL_CHECK_INNODB
MYSQL_CHECK_EXAMPLEDB
......
......@@ -33,8 +33,6 @@ extern "C" {
#endif
#include "my_handler.h"
/* defines used by myisam-funktions */
/*
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.
......@@ -45,14 +43,19 @@ extern "C" {
running myisamchk compiled for 128 keys on a table with 255 keys.
*/
#define MI_MAX_POSSIBLE_KEY 255 /* For myisam_chk */
#if MAX_INDEXES > MI_MAX_POSSIBLE_KEY
#define MI_MAX_KEY MI_MAX_POSSIBLE_KEY /* Max allowed keys */
#else
#define MI_MAX_KEY MAX_INDEXES /* Max allowed keys */
#endif
#define MI_MAX_POSSIBLE_KEY_BUFF (1024+6+6) /* For myisam_chk */
/*
The following defines can be increased if necessary.
BUT: MI_MAX_KEY must be <= MI_MAX_POSSIBLE_KEY.
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH.
*/
#define MI_MAX_KEY 64 /* Max allowed keys */
#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */
#define MI_MAX_KEY_SEG 16 /* Max segments for key */
#define MI_MAX_KEY_LENGTH 1000
#define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8)
#define MI_MAX_MSG_BUF 1024 /* used in CHECK TABLE, REPAIR TABLE */
......
......@@ -42,7 +42,11 @@
/* TODO convert all these three maps to Bitmap classes */
typedef ulonglong table_map; /* Used for table bits in join */
typedef Bitmap<64> key_map; /* Used for finding keys */
#if MAX_INDEXES <= 64
typedef Bitmap<64> key_map; /* Used for finding keys */
#else
typedef Bitmap<((MAX_INDEXES+7)/8*8)> key_map; /* Used for finding keys */
#endif
typedef ulong key_part_map; /* Used for finding key parts */
/*
Used to identify NESTED_JOIN structures within a join (applicable only to
......
......@@ -3172,6 +3172,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
trp->is_covering= TRUE;
trp->read_cost= total_cost;
trp->records= records;
trp->cpk_scan= NULL;
DBUG_PRINT("info",
("Returning covering ROR-intersect plan: cost %g, records %lu",
......
......@@ -48,7 +48,7 @@
#define MAX_ALIAS_NAME 256
#define MAX_FIELD_NAME 34 /* Max colum name length +2 */
#define MAX_SYS_VAR_LENGTH 32
#define MAX_KEY 64 /* Max used keys */
#define MAX_KEY MAX_INDEXES /* Max used keys */
#define MAX_REF_PARTS 16 /* Max parts used as ref */
#define MAX_KEY_LENGTH 3072 /* max possible key */
#if SIZEOF_OFF_T > 4
......
......@@ -36,7 +36,7 @@
#define VER "2.1"
#define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */
#define MAX_KEY 64
#define MAX_KEY MAX_INDEXES
#define MAX_SERVER_ARGS 64
/* set default options */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment