Commit 25d34b23 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.1-new

into mysql.com:/data0/mysqldev/my/mysql-5.1.3-pushmain

parents 878e2618 8280d204
......@@ -45,6 +45,11 @@ fi
# Make sure to enable all features that affect "make dist"
./configure \
--with-embedded-server \
--with-archive-storage-engine \
--with-blackhole-storage-engine \
--with-csv-storage-engine \
--with-example-storage-engine \
--with-federated-storage-engine \
--with-berkeley-db \
--with-innodb \
--enable-thread-safe-client \
......
......@@ -21,7 +21,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include,../libmysqld,../sql,../regex,../extra/yassl/include,../bdb/build_win32,../zlib"
AdditionalIncludeDirectories="../include,../libmysqld,../sql,../regex,../extra/yassl/include,../storage/bdb/build_win32,../zlib"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
......@@ -156,7 +156,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../libmysqld,../sql,../regex,../extra/yassl/include,../bdb/build_win32,../zlib"
AdditionalIncludeDirectories="../include,../libmysqld,../sql,../regex,../extra/yassl/include,../storage/bdb/build_win32,../zlib"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__"
StringPooling="TRUE"
RuntimeLibrary="0"
......
......@@ -22,7 +22,7 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/myisam_ftdump.pch"
......@@ -83,7 +83,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -140,7 +140,7 @@
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\myisam\myisam_ftdump.c">
RelativePath="..\storage\myisam\myisam_ftdump.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
......
......@@ -23,7 +23,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;_CONSOLE;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -84,7 +84,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -146,7 +146,7 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/myisamchk.pch"
......@@ -202,7 +202,7 @@
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\myisam\myisamchk.c">
RelativePath="..\storage\myisam\myisamchk.c">
<FileConfiguration
Name="Release|Win32">
<Tool
......
......@@ -22,7 +22,7 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/myisamlog.pch"
......@@ -83,7 +83,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -146,7 +146,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;_CONSOLE;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -202,7 +202,7 @@
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\myisam\myisamlog.c">
RelativePath="..\storage\myisam\myisamlog.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
......
......@@ -22,7 +22,7 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/myisampack.pch"
......@@ -83,7 +83,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;_CONSOLE;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -144,7 +144,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../myisam"
AdditionalIncludeDirectories="../include,../storage/myisam"
PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -202,7 +202,7 @@
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\myisam\myisampack.c">
RelativePath="..\storage\myisam\myisampack.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
......
......@@ -124,7 +124,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../zlib,../include,../regex,../libmysqld,../sql,../bdb/build_win32"
AdditionalIncludeDirectories="../zlib,../include,../regex,../libmysqld,../sql,../storage/bdb/build_win32"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;MYSQL_SERVER;HAVE_INNOBASE_DB;USE_TLS;__WIN__"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
......@@ -175,7 +175,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../bdb/build_win32,../zlib"
AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../storage/bdb/build_win32,../zlib"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;MYSQL_SERVER;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__"
StringPooling="TRUE"
RuntimeLibrary="0"
......
......@@ -21,7 +21,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include,../regex,../sql,../bdb/build_win32,libmysqld"
AdditionalIncludeDirectories="../include,../regex,../sql,../storage/bdb/build_win32,libmysqld"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
......@@ -73,7 +73,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../include,../regex,../sql,../bdb/build_win32,../libmysqld"
AdditionalIncludeDirectories="../include,../regex,../sql,../storage/bdb/build_win32,../libmysqld"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_BERKELEY_DB;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS"
StringPooling="TRUE"
RuntimeLibrary="0"
......
......@@ -86,7 +86,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
AdditionalIncludeDirectories="../storage/bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;USE_SYMDIR;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -147,7 +147,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
AdditionalIncludeDirectories="../storage/bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
PreprocessorDefinitions="NDEBUG;__NT__;DBUG_OFF;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -335,7 +335,7 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
AdditionalIncludeDirectories="../storage/bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/mysqld.pch"
......@@ -3745,7 +3745,7 @@
</FileConfiguration>
</File>
<File
RelativePath="..\myisammrg\myrg_rnext_same.c">
RelativePath="..\storage\myisammrg\myrg_rnext_same.c">
<FileConfiguration
Name="classic nt|Win32">
<Tool
......
......@@ -71,7 +71,7 @@
#include "ha_example.h"
static handler* example_create_handler(TABLE *table);
static handler* example_create_handler(TABLE_SHARE *table);
handlerton example_hton= {
"EXAMPLE",
......@@ -213,7 +213,7 @@ static int free_share(EXAMPLE_SHARE *share)
}
static handler* example_create_handler(TABLE *table)
static handler* example_create_handler(TABLE_SHARE *table)
{
return new ha_example(table);
}
......
......@@ -4503,18 +4503,18 @@ int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked)
if (!res)
info(HA_STATUS_VARIABLE | HA_STATUS_CONST);
if (table->part_info)
{
m_part_info= table->part_info;
if (!(m_part_info->part_type == HASH_PARTITION &&
m_part_info->list_of_part_fields &&
!is_sub_partitioned(m_part_info)))
m_use_partition_function= TRUE;
}
DBUG_RETURN(res);
}
void ha_ndbcluster::set_part_info(partition_info *part_info)
{
m_part_info= part_info;
if (!(m_part_info->part_type == HASH_PARTITION &&
m_part_info->list_of_part_fields &&
!is_sub_partitioned(m_part_info)))
m_use_partition_function= TRUE;
}
/*
Close the table
......
......@@ -534,6 +534,7 @@ class ha_ndbcluster: public handler
return (HA_CAN_PARTITION | HA_CAN_UPDATE_PARTITION_KEY |
HA_CAN_PARTITION_UNIQUE);
}
void set_part_info(partition_info *part_info);
ulong index_flags(uint idx, uint part, bool all_parts) const;
uint max_supported_record_length() const;
uint max_supported_keys() const;
......
......@@ -122,7 +122,7 @@ class ha_partition :public handler
PARTITION_SHARE *share; /* Shared lock info */
public:
void set_part_info(partition_info *part_info)
virtual void set_part_info(partition_info *part_info)
{
m_part_info= part_info;
m_is_sub_partitioned= is_sub_partitioned(part_info);
......
......@@ -1273,6 +1273,7 @@ class handler :public Sql_alloc
#ifdef WITH_PARTITION_STORAGE_ENGINE
virtual ulong partition_flags(void) const { return 0;}
virtual int get_default_no_partitions(ulonglong max_rows) { return 1;}
virtual void set_part_info(partition_info *part_info) { return; }
#endif
virtual ulong index_flags(uint idx, uint part, bool all_parts) const =0;
virtual ulong index_ddl_flags(KEY *wanted_index) const
......
......@@ -3128,7 +3128,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
}
part_info= lex.part_info;
table->part_info= part_info;
((ha_partition*)table->file)->set_part_info(part_info);
table->file->set_part_info(part_info);
if (part_info->default_engine_type == DB_TYPE_UNKNOWN)
part_info->default_engine_type= default_db_type;
else
......
......@@ -539,17 +539,28 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
}
if (next_chunk + 4 < buff_end)
{
if ((share->partition_info_len= uint4korr(next_chunk)))
uint32 partition_info_len = uint4korr(next_chunk);
#ifdef WITH_PARTITION_STORAGE_ENGINE
if ((share->partition_info_len= partition_info_len))
{
if (!(share->partition_info=
(uchar*) memdup_root(&share->mem_root, next_chunk + 4,
share->partition_info_len + 1)))
partition_info_len + 1)))
{
my_free(buff, MYF(0));
goto err;
}
next_chunk+= share->partition_info_len + 5;
next_chunk++;
}
#else
if (partition_info_len)
{
DBUG_PRINT("info", ("WITH_PARTITION_STORAGE_ENGINE is not defined"));
my_free(buff, MYF(0));
goto err;
}
#endif
next_chunk+= 4 + partition_info_len;
}
keyinfo= share->key_info;
for (i= 0; i < keys; i++, keyinfo++)
......
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