Commit 935a2379 authored by jmiller@mysql.com's avatar jmiller@mysql.com

Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/home/ndbdev/jmiller/clones/mysql-5.1-new
parents ad4ec4a6 edc91d66
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
ProjectType="Visual C++" ProjectType="Visual C++"
Version="7.10" Version="7.10"
Name="mysqlslap" Name="mysqlslap"
ProjectGUID="{2E9332CF-072A-4381-BF37-17C5AB4F8583}"
SccProjectName="" SccProjectName=""
SccLocalPath=""> SccLocalPath="">
<Platforms> <Platforms>
...@@ -39,7 +40,7 @@ ...@@ -39,7 +40,7 @@
Name="VCCustomBuildTool"/> Name="VCCustomBuildTool"/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib" AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib mysqlclient.lib mysys.lib"
OutputFile="../client_release/mysqlslap.exe" OutputFile="../client_release/mysqlslap.exe"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="TRUE" SuppressStartupBanner="TRUE"
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
Name="VCCustomBuildTool"/> Name="VCCustomBuildTool"/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib" AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib mysqlclient.lib mysys.lib"
OutputFile="../client_classic/mysqlslap.exe" OutputFile="../client_classic/mysqlslap.exe"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="TRUE" SuppressStartupBanner="TRUE"
...@@ -161,7 +162,7 @@ ...@@ -161,7 +162,7 @@
Name="VCCustomBuildTool"/> Name="VCCustomBuildTool"/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib" AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib mysqlclient.lib mysys.lib"
OutputFile="../client_debug/mysqlslap.exe" OutputFile="../client_debug/mysqlslap.exe"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="TRUE" SuppressStartupBanner="TRUE"
......
This diff is collapsed.
...@@ -229,6 +229,141 @@ ...@@ -229,6 +229,141 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="..\mysys\my_new.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\mysys\my_bit.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\mysys\my_bitmap.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\mysys\my_vle.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\mysys\base64.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="..\client\mysqlbinlog.cpp"> RelativePath="..\client\mysqlbinlog.cpp">
<FileConfiguration <FileConfiguration
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../zlib" AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../zlib"
PreprocessorDefinitions="WIN32;_LIB;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;USE_SYMDIR;MYSQL_SERVER;LICENSE=Commercial;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;WITH_INNOBASE_STORAGE_ENGINE" PreprocessorDefinitions="WIN32;_LIB;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;USE_SYMDIR;MYSQL_SERVER;LICENSE=Commercial;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;WITH_INNOBASE_STORAGE_ENGINE;HAVE_ROW_BASED_REPLICATION"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="TRUE"
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../zlib,../include,../regex,../libmysqld,../sql,../storage/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__;WITH_INNOBASE_STORAGE_ENGINE" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;MYSQL_SERVER;HAVE_INNOBASE_DB;USE_TLS;__WIN__;WITH_INNOBASE_STORAGE_ENGINE;HAVE_ROW_BASED_REPLICATION"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/mysqldemb.pch" PrecompiledHeaderFile=".\Debug/mysqldemb.pch"
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../storage/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__;WITH_INNOBASE_STORAGE_ENGINE" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;MYSQL_SERVER;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;WITH_INNOBASE_STORAGE_ENGINE;HAVE_ROW_BASED_REPLICATION"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="TRUE"
......
...@@ -305,6 +305,50 @@ ...@@ -305,6 +305,50 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="base64.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="TLS_DEBUG|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="TLS|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="charset-def.c"> RelativePath="charset-def.c">
<FileConfiguration <FileConfiguration
...@@ -4267,6 +4311,49 @@ ...@@ -4267,6 +4311,49 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="my_vle.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="TLS_DEBUG|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="TLS|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="mysys_priv.h"> RelativePath="mysys_priv.h">
</File> </File>
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
OptimizeForProcessor="2" OptimizeForProcessor="2"
AdditionalIncludeDirectories="../storage/bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib" AdditionalIncludeDirectories="../storage/bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
PreprocessorDefinitions="NDEBUG;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;WITH_INNOBASE_STORAGE_ENGINE;WITH_BERKELEY_STORAGE_ENGINE;WITH_ARCHIVE_STORAGE_ENGINE;WITH_BLACKHOLE_STORAGE_ENGINE;WITH_EXAMPLE_STORAGE_ENGINE;WITH_FEDERATED_STORAGE_ENGINE;WITH_PARTITION_STORAGE_ENGINE" PreprocessorDefinitions="NDEBUG;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;WITH_INNOBASE_STORAGE_ENGINE;WITH_BERKELEY_STORAGE_ENGINE;WITH_ARCHIVE_STORAGE_ENGINE;WITH_BLACKHOLE_STORAGE_ENGINE;WITH_EXAMPLE_STORAGE_ENGINE;WITH_FEDERATED_STORAGE_ENGINE;WITH_PARTITION_STORAGE_ENGINE;HAVE_ROW_BASED_REPLICATION"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="TRUE"
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
OptimizeForProcessor="2" OptimizeForProcessor="2"
AdditionalIncludeDirectories="../storage/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;WITH_INNOBASE_STORAGE_ENGINE;WITH_BERKELEY_STORAGE_ENGINE;WITH_ARCHIVE_STORAGE_ENGINE;WITH_BLACKHOLE_STORAGE_ENGINE;WITH_EXAMPLE_STORAGE_ENGINE;WITH_FEDERATED_STORAGE_ENGINE;WITH_PARTITION_STORAGE_ENGINE" 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;WITH_INNOBASE_STORAGE_ENGINE;WITH_BERKELEY_STORAGE_ENGINE;WITH_ARCHIVE_STORAGE_ENGINE;WITH_BLACKHOLE_STORAGE_ENGINE;WITH_EXAMPLE_STORAGE_ENGINE;WITH_FEDERATED_STORAGE_ENGINE;WITH_PARTITION_STORAGE_ENGINE;HAVE_ROW_BASED_REPLICATION"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="TRUE"
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
Optimization="0" Optimization="0"
OptimizeForProcessor="2" OptimizeForProcessor="2"
AdditionalIncludeDirectories="../storage/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;WITH_INNOBASE_STORAGE_ENGINE;WITH_BERKELEY_STORAGE_ENGINE;WITH_ARCHIVE_STORAGE_ENGINE;WITH_BLACKHOLE_STORAGE_ENGINE;WITH_EXAMPLE_STORAGE_ENGINE;WITH_FEDERATED_STORAGE_ENGINE;WITH_PARTITION_STORAGE_ENGINE" 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;WITH_INNOBASE_STORAGE_ENGINE;WITH_BERKELEY_STORAGE_ENGINE;WITH_ARCHIVE_STORAGE_ENGINE;WITH_BLACKHOLE_STORAGE_ENGINE;WITH_EXAMPLE_STORAGE_ENGINE;WITH_FEDERATED_STORAGE_ENGINE;WITH_PARTITION_STORAGE_ENGINE;HAVE_ROW_BASED_REPLICATION"
RuntimeLibrary="1" RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/mysqld.pch" PrecompiledHeaderFile=".\debug/mysqld.pch"
AssemblerListingLocation=".\debug/" AssemblerListingLocation=".\debug/"
...@@ -3242,6 +3242,82 @@ ...@@ -3242,6 +3242,82 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="item_xmlfunc.cpp">
<FileConfiguration
Name="classic nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="1"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="key.cpp"> RelativePath="key.cpp">
<FileConfiguration <FileConfiguration
...@@ -4907,6 +4983,81 @@ ...@@ -4907,6 +4983,81 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="rpl_tblmap.cpp">
<FileConfiguration
Name="classic nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="set_var.cpp"> RelativePath="set_var.cpp">
<FileConfiguration <FileConfiguration
...@@ -8306,6 +8457,81 @@ ...@@ -8306,6 +8457,81 @@
PreprocessorDefinitions=""/> PreprocessorDefinitions=""/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="sql_binlog.cpp">
<FileConfiguration
Name="classic nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File <File
RelativePath="sql_yacc.cpp"> RelativePath="sql_yacc.cpp">
<FileConfiguration <FileConfiguration
......
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="archive"
ProjectGUID="{4471CADD-737B-4ad7-A108-2FBAA1C4B03B}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\release"
IntermediateDirectory=".\release"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../zlib,../../include"
PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\release/archive.pch"
AssemblerListingLocation=".\release/"
ObjectFile=".\release/"
ProgramDataBaseFileName=".\release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_release\archive.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="TLS_DEBUG|Win32"
OutputDirectory=".\archive___Win32_TLS_DEBUG"
IntermediateDirectory=".\archive___Win32_TLS_DEBUG"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../zlib,../../include"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS"
StringPooling="TRUE"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\archive___Win32_TLS_DEBUG/archive.pch"
AssemblerListingLocation=".\archive___Win32_TLS_DEBUG/"
ObjectFile=".\archive___Win32_TLS_DEBUG/"
ProgramDataBaseFileName=".\archive___Win32_TLS_DEBUG/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_debug\archive_tls.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="TLS|Win32"
OutputDirectory=".\archive___Win32_TLS"
IntermediateDirectory=".\archive___Win32_TLS"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../zlib,../../include"
PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;USE_TLS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\archive___Win32_TLS/archive.pch"
AssemblerListingLocation=".\archive___Win32_TLS/"
ObjectFile=".\archive___Win32_TLS/"
ProgramDataBaseFileName=".\archive___Win32_TLS/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_release\archive_tls.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\debug"
IntermediateDirectory=".\debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../zlib,../../include"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/archive.pch"
AssemblerListingLocation=".\debug/"
ObjectFile=".\debug/"
ProgramDataBaseFileName=".\debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_debug\archive.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="azlib.h">
</File>
<File
RelativePath="azio.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="TLS_DEBUG|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="TLS|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="example"
ProjectGUID="{6B6812DB-636E-465d-B53D-5012F237E539}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\release"
IntermediateDirectory=".\release"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\release/example.pch"
AssemblerListingLocation=".\release/"
ObjectFile=".\release/"
ProgramDataBaseFileName=".\release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_release\example.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="TLS_DEBUG|Win32"
OutputDirectory=".\example___Win32_TLS_DEBUG"
IntermediateDirectory=".\example___Win32_TLS_DEBUG"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS"
StringPooling="TRUE"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\example___Win32_TLS_DEBUG/example.pch"
AssemblerListingLocation=".\example___Win32_TLS_DEBUG/"
ObjectFile=".\example___Win32_TLS_DEBUG/"
ProgramDataBaseFileName=".\example___Win32_TLS_DEBUG/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_debug\example_tls.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="TLS|Win32"
OutputDirectory=".\example___Win32_TLS"
IntermediateDirectory=".\example___Win32_TLS"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;USE_TLS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\example___Win32_TLS/example.pch"
AssemblerListingLocation=".\example___Win32_TLS/"
ObjectFile=".\example___Win32_TLS/"
ProgramDataBaseFileName=".\example___Win32_TLS/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_release\example_tls.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\debug"
IntermediateDirectory=".\debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/example.pch"
AssemblerListingLocation=".\debug/"
ObjectFile=".\debug/"
ProgramDataBaseFileName=".\debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_debug\example.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="ha_example.h">
</File>
<File
RelativePath="ha_example.cpp">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="TLS_DEBUG|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="TLS|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
...@@ -48,7 +48,7 @@ mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \ ...@@ -48,7 +48,7 @@ mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \
$(top_srcdir)/mysys/my_vle.c \ $(top_srcdir)/mysys/my_vle.c \
$(top_srcdir)/mysys/base64.c $(top_srcdir)/mysys/base64.c
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS) mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqlslap_LDADD = $(LDADD) $(CXXLDFLAGS) -lpthread mysqlslap_LDADD = $(LDADD) $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS)
mysqltestmanager_pwgen_SOURCES = mysqlmanager-pwgen.c mysqltestmanager_pwgen_SOURCES = mysqlmanager-pwgen.c
mysqltestmanagerc_SOURCES= mysqlmanagerc.c $(yassl_dummy_link_fix) mysqltestmanagerc_SOURCES= mysqlmanagerc.c $(yassl_dummy_link_fix)
mysqlcheck_SOURCES= mysqlcheck.c $(yassl_dummy_link_fix) mysqlcheck_SOURCES= mysqlcheck.c $(yassl_dummy_link_fix)
......
...@@ -85,13 +85,25 @@ ...@@ -85,13 +85,25 @@
#include <stdarg.h> #include <stdarg.h>
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include <sys/types.h> #include <sys/types.h>
#ifndef __WIN__
#include <sys/wait.h> #include <sys/wait.h>
#endif
#include <ctype.h> #include <ctype.h>
#include <my_pthread.h> #include <my_pthread.h>
#define MYSLAPLOCK "/myslaplock.lck" #define MYSLAPLOCK "/myslaplock.lck"
#define MYSLAPLOCK_DIR "/tmp" #define MYSLAPLOCK_DIR "/tmp"
#ifdef __WIN__
#define srandom srand
#define random rand
#define snprintf _snprintf
#endif
#ifdef HAVE_SMEM
static char *shared_memory_base_name=0;
#endif
static char **defaults_argv; static char **defaults_argv;
static char *host= NULL, *opt_password= NULL, *user= NULL, static char *host= NULL, *opt_password= NULL, *user= NULL,
...@@ -213,6 +225,17 @@ static long int timedif(struct timeval a, struct timeval b) ...@@ -213,6 +225,17 @@ static long int timedif(struct timeval a, struct timeval b)
return s + us; return s + us;
} }
#ifdef __WIN__
static int gettimeofday(struct timeval *tp, void *tzp)
{
unsigned int ticks;
ticks= GetTickCount();
tp->tv_usec= ticks*1000;
tp->tv_sec= ticks/1000;
return 0;
}
#endif
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
...@@ -222,7 +245,10 @@ int main(int argc, char **argv) ...@@ -222,7 +245,10 @@ int main(int argc, char **argv)
unsigned long long client_limit; unsigned long long client_limit;
statement *eptr; statement *eptr;
DBUG_ENTER("main"); #ifdef __WIN__
opt_use_threads= 1;
#endif
MY_INIT(argv[0]); MY_INIT(argv[0]);
/* Seed the random number generator if we will be using it. */ /* Seed the random number generator if we will be using it. */
...@@ -353,12 +379,14 @@ int main(int argc, char **argv) ...@@ -353,12 +379,14 @@ int main(int argc, char **argv)
free_defaults(defaults_argv); free_defaults(defaults_argv);
my_end(0); my_end(0);
DBUG_RETURN(0); /* No compiler warnings */ return 0;
} }
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0},
{"auto-generate-sql", 'a', {"auto-generate-sql", 'a',
"Generate SQL where not supplied by file or command line.", "Generate SQL where not supplied by file or command line.",
(gptr*) &auto_generate_sql, (gptr*) &auto_generate_sql, (gptr*) &auto_generate_sql, (gptr*) &auto_generate_sql,
...@@ -375,7 +403,8 @@ static struct my_option my_long_options[] = ...@@ -375,7 +403,8 @@ static struct my_option my_long_options[] =
{"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.", {"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.",
(gptr*) &create_schema_string, (gptr*) &create_schema_string, 0, GET_STR, (gptr*) &create_schema_string, (gptr*) &create_schema_string, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"csv", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.", {"csv", OPT_CREATE_SLAP_SCHEMA,
"Generate CSV output to named file or to stdout if no file is named.",
(gptr*) &opt_csv_str, (gptr*) &opt_csv_str, 0, GET_STR, (gptr*) &opt_csv_str, (gptr*) &opt_csv_str, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0}, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
...@@ -388,8 +417,6 @@ static struct my_option my_long_options[] = ...@@ -388,8 +417,6 @@ static struct my_option my_long_options[] =
{"engine", 'e', "Storage engine to use for creating the table.", {"engine", 'e', "Storage engine to use for creating the table.",
(gptr*) &default_engine, (gptr*) &default_engine, 0, (gptr*) &default_engine, (gptr*) &default_engine, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR, {"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"iterations", 'i', "Number of times too run the tests.", (gptr*) &iterations, {"iterations", 'i', "Number of times too run the tests.", (gptr*) &iterations,
...@@ -402,28 +429,28 @@ static struct my_option my_long_options[] = ...@@ -402,28 +429,28 @@ static struct my_option my_long_options[] =
(gptr*) &num_char_cols, (gptr*) &num_char_cols, 0, GET_UINT, REQUIRED_ARG, (gptr*) &num_char_cols, (gptr*) &num_char_cols, 0, GET_UINT, REQUIRED_ARG,
1, 0, 0, 0, 0, 0}, 1, 0, 0, 0, 0, 0},
{"number-int-cols", 'y', {"number-int-cols", 'y',
"Number of VARCHAR columns to create table with if specifying \ "Number of VARCHAR columns to create table with if specifying "
--sql-generate-sql.", (gptr*) &num_int_cols, (gptr*) &num_int_cols, 0, "--sql-generate-sql.", (gptr*) &num_int_cols, (gptr*) &num_int_cols, 0,
GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0}, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
{"number-of-query", OPT_MYSQL_NUMBER_OF_QUERY, {"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
"Limit each client to this number of queries (this is not exact).", "Limit each client to this number of queries (this is not exact).",
(gptr*) &num_of_query, (gptr*) &num_of_query, 0, (gptr*) &num_of_query, (gptr*) &num_of_query, 0,
GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"only-print", OPT_MYSQL_ONLY_PRINT, {"only-print", OPT_MYSQL_ONLY_PRINT,
"This causes mysqlslap to not connect to the databases, but instead print \ "This causes mysqlslap to not connect to the databases, but instead print "
out what it would have done instead.", "out what it would have done instead.",
(gptr*) &opt_only_print, (gptr*) &opt_only_print, 0, GET_BOOL, NO_ARG, (gptr*) &opt_only_print, (gptr*) &opt_only_print, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given it's \ "Password to use when connecting to server. If password is not given it's "
asked from the tty.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, "asked from the tty.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
0},
#ifdef __WIN__ #ifdef __WIN__
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
0},
{"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA, {"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA,
"Preserve the schema from the mysqlslap run.", "Preserve the schema from the mysqlslap run.",
(gptr*) &opt_preserve, (gptr*) &opt_preserve, 0, GET_BOOL, (gptr*) &opt_preserve, (gptr*) &opt_preserve, 0, GET_BOOL,
...@@ -434,33 +461,33 @@ static struct my_option my_long_options[] = ...@@ -434,33 +461,33 @@ static struct my_option my_long_options[] =
{"query", 'q', "Query to run or file containing query to run.", {"query", 'q', "Query to run or file containing query to run.",
(gptr*) &user_supplied_query, (gptr*) &user_supplied_query, (gptr*) &user_supplied_query, (gptr*) &user_supplied_query,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"silent", 's', "Run program in silent mode - no output.",
(gptr*) &opt_silent, (gptr*) &opt_silent, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, "Base name of shared memory.", (gptr*) &shared_memory_base_name,
(gptr*) &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, (gptr*) &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#endif #endif
{"silent", 's', "Run program in silent mode - no output.",
(gptr*) &opt_silent, (gptr*) &opt_silent, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
{"slave", OPT_MYSQL_SLAP_SLAVE, "Follow master locks for other slap clients", {"slave", OPT_MYSQL_SLAP_SLAVE, "Follow master locks for other slap clients",
(gptr*) &opt_slave, (gptr*) &opt_slave, 0, GET_BOOL, NO_ARG, (gptr*) &opt_slave, (gptr*) &opt_slave, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h>
{"use-threads", OPT_USE_THREADS, {"use-threads", OPT_USE_THREADS,
"Use pthread calls instead of fork() calls (default on Windows)", "Use pthread calls instead of fork() calls (default on Windows)",
(gptr*) &opt_use_threads, (gptr*) &opt_use_threads, 0, (gptr*) &opt_use_threads, (gptr*) &opt_use_threads, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &user, {"user", 'u', "User for login if not current user.", (gptr*) &user,
(gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', {"verbose", 'v',
"More verbose output; You can use this multiple times to get even more \ "More verbose output; You can use this multiple times to get even more "
verbose output.", (gptr*) &verbose, (gptr*) &verbose, 0, "verbose output.", (gptr*) &verbose, (gptr*) &verbose, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
...@@ -936,7 +963,6 @@ drop_schema(MYSQL *mysql, const char *db) ...@@ -936,7 +963,6 @@ drop_schema(MYSQL *mysql, const char *db)
DBUG_RETURN(0); DBUG_RETURN(0);
} }
static int static int
run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
{ {
...@@ -980,6 +1006,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -980,6 +1006,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
} }
} }
} }
#ifndef __WIN__
else else
{ {
fflush(NULL); fflush(NULL);
...@@ -1020,6 +1047,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1020,6 +1047,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
} }
} }
} }
#endif
/* Lets release use some clients! */ /* Lets release use some clients! */
if (!opt_slave) if (!opt_slave)
...@@ -1041,6 +1069,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1041,6 +1069,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
} }
my_lock(lock_file, F_UNLCK, 0, F_TO_EOF, MYF(0)); my_lock(lock_file, F_UNLCK, 0, F_TO_EOF, MYF(0));
} }
#ifndef __WIN__
else else
{ {
WAIT: WAIT:
...@@ -1051,6 +1080,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1051,6 +1080,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
DBUG_PRINT("info", ("Parent: child %d status %d", pid, status)); DBUG_PRINT("info", ("Parent: child %d status %d", pid, status));
} }
} }
#endif
gettimeofday(&end_time, NULL); gettimeofday(&end_time, NULL);
my_close(lock_file, MYF(0)); my_close(lock_file, MYF(0));
......
...@@ -39,7 +39,10 @@ then ...@@ -39,7 +39,10 @@ then
AC_DEFINE([$5]) AC_DEFINE([$5])
mysql_se_decls="${mysql_se_decls},$6" mysql_se_decls="${mysql_se_decls},$6"
mysql_se_htons="${mysql_se_htons},&$6" mysql_se_htons="${mysql_se_htons},&$6"
if test "$8" != "no"
then
mysql_se_objs="$mysql_se_objs $8" mysql_se_objs="$mysql_se_objs $8"
fi
mysql_se_dirs="$mysql_se_dirs $7" mysql_se_dirs="$mysql_se_dirs $7"
mysql_se_libs="$mysql_se_libs $9" mysql_se_libs="$mysql_se_libs $9"
else else
......
...@@ -1420,6 +1420,7 @@ AC_MSG_CHECKING("named thread libs:") ...@@ -1420,6 +1420,7 @@ AC_MSG_CHECKING("named thread libs:")
if test "$with_named_thread" != "no" if test "$with_named_thread" != "no"
then then
LIBS="$with_named_thread $LIBS $with_named_thread" LIBS="$with_named_thread $LIBS $with_named_thread"
CLIENT_THREAD_LIBS="$with_named_thread"
with_posix_threads="yes" with_posix_threads="yes"
AC_MSG_RESULT("$with_named_thread") AC_MSG_RESULT("$with_named_thread")
else else
...@@ -1436,6 +1437,7 @@ else ...@@ -1436,6 +1437,7 @@ else
AC_MSG_CHECKING("for pthread_create in -lpthread"); AC_MSG_CHECKING("for pthread_create in -lpthread");
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="$LIBS -lpthread" LIBS="$LIBS -lpthread"
CLIENT_THREAD_LIBS="-lpthread"
AC_TRY_LINK( AC_TRY_LINK(
[#include <pthread.h>], [#include <pthread.h>],
[ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
...@@ -1444,6 +1446,7 @@ else ...@@ -1444,6 +1446,7 @@ else
if test "$with_posix_threads" = "no" if test "$with_posix_threads" = "no"
then then
LIBS=" $ac_save_LIBS -lpthreads" LIBS=" $ac_save_LIBS -lpthreads"
CLIENT_THREAD_LIBS="-lpthreads"
AC_MSG_CHECKING("for pthread_create in -lpthreads"); AC_MSG_CHECKING("for pthread_create in -lpthreads");
AC_TRY_LINK( AC_TRY_LINK(
[#include <pthread.h>], [#include <pthread.h>],
...@@ -1454,6 +1457,7 @@ else ...@@ -1454,6 +1457,7 @@ else
then then
# This is for FreeBSD # This is for FreeBSD
LIBS="$ac_save_LIBS -pthread" LIBS="$ac_save_LIBS -pthread"
CLIENT_THREAD_LIBS="-pthread"
AC_MSG_CHECKING("for pthread_create in -pthread"); AC_MSG_CHECKING("for pthread_create in -pthread");
AC_TRY_LINK( AC_TRY_LINK(
[#include <pthread.h>], [#include <pthread.h>],
...@@ -2437,7 +2441,8 @@ MYSQL_STORAGE_ENGINE(archive,,,,,,storage/archive,, ...@@ -2437,7 +2441,8 @@ MYSQL_STORAGE_ENGINE(archive,,,,,,storage/archive,,
\$(top_builddir)/storage/archive/libarchive.a, [ \$(top_builddir)/storage/archive/libarchive.a, [
AC_CONFIG_FILES(storage/archive/Makefile) AC_CONFIG_FILES(storage/archive/Makefile)
]) ])
MYSQL_STORAGE_ENGINE(csv,,,,,no,storage/csv,,,[ MYSQL_STORAGE_ENGINE(csv,,,"yes",,tina_hton,storage/csv,no,
\$(top_builddir)/storage/csv/libcsv.a,[
AC_CONFIG_FILES(storage/csv/Makefile) AC_CONFIG_FILES(storage/csv/Makefile)
]) ])
MYSQL_STORAGE_ENGINE(blackhole) MYSQL_STORAGE_ENGINE(blackhole)
...@@ -2469,6 +2474,7 @@ fi ...@@ -2469,6 +2474,7 @@ fi
CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS" CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
AC_SUBST(CLIENT_LIBS) AC_SUBST(CLIENT_LIBS)
AC_SUBST(CLIENT_THREAD_LIBS)
AC_SUBST(NON_THREADED_LIBS) AC_SUBST(NON_THREADED_LIBS)
AC_SUBST(STATIC_NSS_FLAGS) AC_SUBST(STATIC_NSS_FLAGS)
AC_SUBST(sql_client_dirs) AC_SUBST(sql_client_dirs)
......
...@@ -876,9 +876,10 @@ static void usage(void) ...@@ -876,9 +876,10 @@ static void usage(void)
{ {
DBUG_ENTER("usage"); DBUG_ENTER("usage");
print_version(); print_version();
printf("This software comes with ABSOLUTELY NO WARRANTY. This is free " printf("This software comes with ABSOLUTELY NO WARRANTY. "
"software,\nand you are welcome to modify and redistribute it under " "This is free software,\n"
"the GPL license\nUsage:\n"); "and you are welcome to modify and redistribute it under the GPL license.\n"
"Usage:\n");
my_print_help(my_long_options); my_print_help(my_long_options);
my_print_variables(my_long_options); my_print_variables(my_long_options);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
...@@ -353,6 +353,9 @@ inline double ulonglong2double(ulonglong value) ...@@ -353,6 +353,9 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_VIO_READ_BUFF #define HAVE_VIO_READ_BUFF
#define HAVE_STRNLEN #define HAVE_STRNLEN
#define strcasecmp stricmp
#define strncasecmp strnicmp
#ifndef __NT__ #ifndef __NT__
#undef FILE_SHARE_DELETE #undef FILE_SHARE_DELETE
#define FILE_SHARE_DELETE 0 /* Not implemented on Win 98/ME */ #define FILE_SHARE_DELETE 0 /* Not implemented on Win 98/ME */
......
...@@ -67,6 +67,7 @@ extern MY_UNICASE_INFO *my_unicase_turkish[256]; ...@@ -67,6 +67,7 @@ extern MY_UNICASE_INFO *my_unicase_turkish[256];
#define MY_CS_READY 256 /* if a charset is initialized */ #define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/ #define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */ #define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
#define MY_CHARSET_UNDEFINED 0 #define MY_CHARSET_UNDEFINED 0
......
...@@ -161,7 +161,12 @@ enum ha_extra_function { ...@@ -161,7 +161,12 @@ enum ha_extra_function {
handling on the slave handling on the slave
*/ */
HA_EXTRA_IGNORE_NO_KEY, HA_EXTRA_IGNORE_NO_KEY,
HA_EXTRA_NO_IGNORE_NO_KEY HA_EXTRA_NO_IGNORE_NO_KEY,
/*
Mark the table as a log table. For some handlers (e.g. CSV) this results
in a special locking for the table.
*/
HA_EXTRA_MARK_AS_LOG_TABLE
}; };
/* The following is parameter to ha_panic() */ /* The following is parameter to ha_panic() */
......
...@@ -806,6 +806,9 @@ extern void print_defaults(const char *conf_file, const char **groups); ...@@ -806,6 +806,9 @@ extern void print_defaults(const char *conf_file, const char **groups);
extern my_bool my_compress(byte *, ulong *, ulong *); extern my_bool my_compress(byte *, ulong *, ulong *);
extern my_bool my_uncompress(byte *, ulong *, ulong *); extern my_bool my_uncompress(byte *, ulong *, ulong *);
extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen); extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen);
extern int packfrm(const void *, uint, const void **, uint *);
extern int unpackfrm(const void **, uint *, const void *);
extern ha_checksum my_checksum(ha_checksum crc, const byte *mem, uint count); extern ha_checksum my_checksum(ha_checksum crc, const byte *mem, uint count);
extern uint my_bit_log2(ulong value); extern uint my_bit_log2(ulong value);
extern uint my_count_bits(ulonglong v); extern uint my_count_bits(ulonglong v);
......
...@@ -130,14 +130,14 @@ typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ ...@@ -130,14 +130,14 @@ typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
#include "my_alloc.h" #include "my_alloc.h"
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
typedef struct st_mysql_data { typedef struct st_mysql_data {
my_ulonglong rows; my_ulonglong rows;
unsigned int fields; unsigned int fields;
MYSQL_ROWS *data; MYSQL_ROWS *data;
MEM_ROOT alloc; MEM_ROOT alloc;
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY) /* extra info for embedded library */
MYSQL_ROWS **prev_ptr; struct embedded_query_result *embedded_info;
#endif
} MYSQL_DATA; } MYSQL_DATA;
enum mysql_option enum mysql_option
...@@ -287,6 +287,8 @@ typedef struct st_mysql ...@@ -287,6 +287,8 @@ typedef struct st_mysql
from mysql_stmt_close if close had to cancel result set of this object. from mysql_stmt_close if close had to cancel result set of this object.
*/ */
my_bool *unbuffered_fetch_owner; my_bool *unbuffered_fetch_owner;
/* needed for embedded server - no net buffer to store the 'info' */
char *info_buffer;
} MYSQL; } MYSQL;
typedef struct st_mysql_res { typedef struct st_mysql_res {
...@@ -755,6 +757,7 @@ typedef struct st_mysql_methods ...@@ -755,6 +757,7 @@ typedef struct st_mysql_methods
const char *(*read_statistics)(MYSQL *mysql); const char *(*read_statistics)(MYSQL *mysql);
my_bool (*next_result)(MYSQL *mysql); my_bool (*next_result)(MYSQL *mysql);
int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd); int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
#endif #endif
} MYSQL_METHODS; } MYSQL_METHODS;
......
...@@ -143,10 +143,12 @@ void thr_unlock(THR_LOCK_DATA *data); ...@@ -143,10 +143,12 @@ void thr_unlock(THR_LOCK_DATA *data);
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data, enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
uint count, THR_LOCK_OWNER *owner); uint count, THR_LOCK_OWNER *owner);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count); void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
void thr_abort_locks(THR_LOCK *lock); void thr_abort_locks(THR_LOCK *lock, bool upgrade_lock);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread); my_bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread);
void thr_print_locks(void); /* For debugging */ void thr_print_locks(void); /* For debugging */
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data); my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data);
void thr_downgrade_write_lock(THR_LOCK_DATA *data,
enum thr_lock_type new_lock_type);
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data); my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -2722,13 +2722,13 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row) ...@@ -2722,13 +2722,13 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
/* Send row request to the server */ /* Send row request to the server */
int4store(buff, stmt->stmt_id); int4store(buff, stmt->stmt_id);
int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */ int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff), if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH,
NullS, 0, 1)) buff, sizeof(buff), NullS, 0, 1))
{ {
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate); set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
return 1; return 1;
} }
if (cli_read_binary_rows(stmt)) if ((*mysql->methods->read_rows_from_cursor)(stmt))
return 1; return 1;
stmt->server_status= mysql->server_status; stmt->server_status= mysql->server_status;
...@@ -5101,9 +5101,9 @@ my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode) ...@@ -5101,9 +5101,9 @@ my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode)
DBUG_ENTER("mysql_autocommit"); DBUG_ENTER("mysql_autocommit");
DBUG_PRINT("enter", ("mode : %d", auto_mode)); DBUG_PRINT("enter", ("mode : %d", auto_mode));
if (auto_mode) /* set to true */ DBUG_RETURN((my_bool) mysql_real_query(mysql, auto_mode ?
DBUG_RETURN((my_bool) mysql_real_query(mysql, "set autocommit=1", 16)); "set autocommit=1":"set autocommit=0",
DBUG_RETURN((my_bool) mysql_real_query(mysql, "set autocommit=0", 16)); 16));
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#ifdef HAVE_QUERY_CACHE #ifdef HAVE_QUERY_CACHE
#include <mysql.h> #include <mysql.h>
#include "emb_qcache.h" #include "emb_qcache.h"
#include "embedded_priv.h"
void Querycache_stream::store_char(char c) void Querycache_stream::store_char(char c)
{ {
...@@ -284,22 +285,25 @@ int Querycache_stream::load_column(MEM_ROOT *alloc, char** column) ...@@ -284,22 +285,25 @@ int Querycache_stream::load_column(MEM_ROOT *alloc, char** column)
uint emb_count_querycache_size(THD *thd) uint emb_count_querycache_size(THD *thd)
{ {
uint result; uint result= 0;
MYSQL *mysql= thd->mysql; MYSQL_FIELD *field;
MYSQL_FIELD *field= mysql->fields; MYSQL_FIELD *field_end;
MYSQL_FIELD *field_end= field + mysql->field_count; MYSQL_ROWS *cur_row;
MYSQL_ROWS *cur_row=NULL; my_ulonglong n_rows;
my_ulonglong n_rows=0; MYSQL_DATA *data= thd->first_data;
while (data->embedded_info->next)
data= data->embedded_info->next;
field= data->embedded_info->fields_list;
field_end= field + data->fields;
if (!field) if (!field)
return 0; return result;
if (thd->data) *data->embedded_info->prev_ptr= NULL; // this marks the last record
{ cur_row= data->data;
*thd->data->prev_ptr= NULL; // this marks the last record n_rows= data->rows;
cur_row= thd->data->data; /* n_fields + n_rows + (field_info + strlen * n_rows) * n_fields */
n_rows= thd->data->rows; result+= (uint) (4+8 + (42 + 4*n_rows)*data->fields);
}
result= (uint) (4+8 + (42 + 4*n_rows)*mysql->field_count);
for(; field < field_end; field++) for(; field < field_end; field++)
{ {
...@@ -313,7 +317,7 @@ uint emb_count_querycache_size(THD *thd) ...@@ -313,7 +317,7 @@ uint emb_count_querycache_size(THD *thd)
for (; cur_row; cur_row=cur_row->next) for (; cur_row; cur_row=cur_row->next)
{ {
MYSQL_ROW col= cur_row->data; MYSQL_ROW col= cur_row->data;
MYSQL_ROW col_end= col + mysql->field_count; MYSQL_ROW col_end= col + data->fields;
for (; col < col_end; col++) for (; col < col_end; col++)
if (*col) if (*col)
result+= *(uint *)((*col) - sizeof(uint)); result+= *(uint *)((*col) - sizeof(uint));
...@@ -323,24 +327,28 @@ uint emb_count_querycache_size(THD *thd) ...@@ -323,24 +327,28 @@ uint emb_count_querycache_size(THD *thd)
void emb_store_querycache_result(Querycache_stream *dst, THD *thd) void emb_store_querycache_result(Querycache_stream *dst, THD *thd)
{ {
MYSQL *mysql= thd->mysql; MYSQL_FIELD *field;
MYSQL_FIELD *field= mysql->fields; MYSQL_FIELD *field_end;
MYSQL_FIELD *field_end= field + mysql->field_count; MYSQL_ROWS *cur_row;
MYSQL_ROWS *cur_row= NULL; my_ulonglong n_rows;
my_ulonglong n_rows= 0; MYSQL_DATA *data= thd->first_data;
DBUG_ENTER("emb_store_querycache_result");
while (data->embedded_info->next)
data= data->embedded_info->next;
field= data->embedded_info->fields_list;
field_end= field + data->fields;
if (!field) if (!field)
return; DBUG_VOID_RETURN;
if (thd->data) *data->embedded_info->prev_ptr= NULL; // this marks the last record
{ cur_row= data->data;
*thd->data->prev_ptr= NULL; // this marks the last record n_rows= data->rows;
cur_row= thd->data->data;
n_rows= thd->data->rows;
}
dst->store_int((uint)mysql->field_count); dst->store_int((uint)data->fields);
dst->store_ll((uint)n_rows); dst->store_ll((ulonglong)n_rows);
for(; field < field_end; field++) for(; field < field_end; field++)
{ {
...@@ -356,14 +364,13 @@ void emb_store_querycache_result(Querycache_stream *dst, THD *thd) ...@@ -356,14 +364,13 @@ void emb_store_querycache_result(Querycache_stream *dst, THD *thd)
dst->store_str(field->org_table, field->org_table_length); dst->store_str(field->org_table, field->org_table_length);
dst->store_str(field->db, field->db_length); dst->store_str(field->db, field->db_length);
dst->store_str(field->catalog, field->catalog_length); dst->store_str(field->catalog, field->catalog_length);
dst->store_safe_str(field->def, field->def_length); dst->store_safe_str(field->def, field->def_length);
} }
for (; cur_row; cur_row=cur_row->next) for (; cur_row; cur_row=cur_row->next)
{ {
MYSQL_ROW col= cur_row->data; MYSQL_ROW col= cur_row->data;
MYSQL_ROW col_end= col + mysql->field_count; MYSQL_ROW col_end= col + data->fields;
for (; col < col_end; col++) for (; col < col_end; col++)
{ {
uint len= *col ? *(uint *)((*col) - sizeof(uint)) : 0; uint len= *col ? *(uint *)((*col) - sizeof(uint)) : 0;
...@@ -371,28 +378,34 @@ void emb_store_querycache_result(Querycache_stream *dst, THD *thd) ...@@ -371,28 +378,34 @@ void emb_store_querycache_result(Querycache_stream *dst, THD *thd)
} }
} }
DBUG_ASSERT(emb_count_querycache_size(thd) == dst->stored_size); DBUG_ASSERT(emb_count_querycache_size(thd) == dst->stored_size);
DBUG_VOID_RETURN;
} }
int emb_load_querycache_result(THD *thd, Querycache_stream *src) int emb_load_querycache_result(THD *thd, Querycache_stream *src)
{ {
MYSQL *mysql= thd->mysql; MYSQL_DATA *data= thd->alloc_new_dataset();
MYSQL_DATA *data;
MYSQL_FIELD *field; MYSQL_FIELD *field;
MYSQL_FIELD *field_end; MYSQL_FIELD *field_end;
MEM_ROOT *f_alloc= &mysql->field_alloc; MEM_ROOT *f_alloc;
MYSQL_ROWS *row, *end_row; MYSQL_ROWS *row, *end_row;
MYSQL_ROWS **prev_row; MYSQL_ROWS **prev_row;
ulonglong rows; ulonglong rows;
MYSQL_ROW columns; MYSQL_ROW columns;
DBUG_ENTER("emb_load_querycache_result");
mysql->field_count= src->load_int(); if (!data)
goto err;
init_alloc_root(&data->alloc, 8192,0);
f_alloc= &data->alloc;
data->fields= src->load_int();
rows= src->load_ll(); rows= src->load_ll();
if (!(field= (MYSQL_FIELD *) if (!(field= (MYSQL_FIELD *)
alloc_root(&mysql->field_alloc,mysql->field_count*sizeof(MYSQL_FIELD)))) alloc_root(f_alloc,data->fields*sizeof(MYSQL_FIELD))))
goto err; goto err;
mysql->fields= field; data->embedded_info->fields_list= field;
for(field_end= field+mysql->field_count; field < field_end; field++) for(field_end= field+data->fields; field < field_end; field++)
{ {
field->length= src->load_int(); field->length= src->load_int();
field->max_length= (unsigned int)src->load_int(); field->max_length= (unsigned int)src->load_int();
...@@ -411,38 +424,34 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src) ...@@ -411,38 +424,34 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src)
goto err; goto err;
} }
if (!rows) row= (MYSQL_ROWS *)alloc_root(&data->alloc,
return 0; (uint) (rows * sizeof(MYSQL_ROWS) +
if (!(data= (MYSQL_DATA*)my_malloc(sizeof(MYSQL_DATA), rows*(data->fields+1)*sizeof(char*)));
MYF(MY_WME | MY_ZEROFILL))))
goto err;
thd->data= data;
init_alloc_root(&data->alloc, 8192,0);
row= (MYSQL_ROWS *)alloc_root(&data->alloc, (uint) (rows * sizeof(MYSQL_ROWS) +
rows * (mysql->field_count+1)*sizeof(char*)));
end_row= row + rows; end_row= row + rows;
columns= (MYSQL_ROW)end_row; columns= (MYSQL_ROW)end_row;
data->rows= rows; data->rows= rows;
data->fields= mysql->field_count;
data->data= row; data->data= row;
if (!rows)
goto return_ok;
for (prev_row= &row->next; row < end_row; prev_row= &row->next, row++) for (prev_row= &row->next; row < end_row; prev_row= &row->next, row++)
{ {
*prev_row= row; *prev_row= row;
row->data= columns; row->data= columns;
MYSQL_ROW col_end= columns + mysql->field_count; MYSQL_ROW col_end= columns + data->fields;
for (; columns < col_end; columns++) for (; columns < col_end; columns++)
src->load_column(&data->alloc, columns); src->load_column(&data->alloc, columns);
*(columns++)= NULL; *(columns++)= NULL;
} }
*prev_row= NULL; *prev_row= NULL;
data->prev_ptr= prev_row; data->embedded_info->prev_ptr= prev_row;
return_ok:
return 0; send_eof(thd);
DBUG_RETURN(0);
err: err:
return 1; DBUG_RETURN(1);
} }
#endif /*HAVE_QUERY_CACHE*/ #endif /*HAVE_QUERY_CACHE*/
......
...@@ -16,18 +16,25 @@ ...@@ -16,18 +16,25 @@
/* Prototypes for the embedded version of MySQL */ /* Prototypes for the embedded version of MySQL */
#include <my_global.h>
#include <mysql.h>
#include <mysql_embed.h>
#include <mysqld_error.h>
#include <my_pthread.h>
C_MODE_START C_MODE_START
void lib_connection_phase(NET *net, int phase); void lib_connection_phase(NET *net, int phase);
void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db); void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db);
void *create_embedded_thd(int client_flag, char *db); void *create_embedded_thd(int client_flag, char *db);
int check_embedded_connection(MYSQL *mysql); int check_embedded_connection(MYSQL *mysql);
void free_old_query(MYSQL *mysql); void free_old_query(MYSQL *mysql);
void embedded_get_error(MYSQL *mysql);
extern MYSQL_METHODS embedded_methods; extern MYSQL_METHODS embedded_methods;
/* This one is used by embedded library to gather returning data */
typedef struct embedded_query_result
{
MYSQL_ROWS **prev_ptr;
unsigned int warning_count, server_status;
struct st_mysql_data *next;
my_ulonglong affected_rows, insert_id;
char info[MYSQL_ERRMSG_SIZE];
MYSQL_FIELD *fields_list;
unsigned int last_errno;
char sqlstate[SQLSTATE_LENGTH+1];
} EQR;
C_MODE_END C_MODE_END
This diff is collapsed.
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <my_global.h>
#include <mysql.h>
#include <mysql_embed.h>
#include <mysqld_error.h>
#include <my_pthread.h>
#include "embedded_priv.h" #include "embedded_priv.h"
#include <my_sys.h> #include <my_sys.h>
#include <mysys_err.h> #include <mysys_err.h>
...@@ -193,7 +198,12 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -193,7 +198,12 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
if (!user) if (!user)
user= ""; user= "";
mysql->user=my_strdup(user,MYF(0)); /*
We need to alloc some space for mysql->info but don't want to
put extra 'my_free's in mysql_close.
So we alloc it with the 'user' string to be freed at once
*/
mysql->user= my_strdup(user, MYF(0));
port=0; port=0;
unix_socket=0; unix_socket=0;
...@@ -207,6 +217,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -207,6 +217,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
if (db) if (db)
client_flag|=CLIENT_CONNECT_WITH_DB; client_flag|=CLIENT_CONNECT_WITH_DB;
mysql->info_buffer= my_malloc(MYSQL_ERRMSG_SIZE, MYF(0));
mysql->thd= create_embedded_thd(client_flag, db_name); mysql->thd= create_embedded_thd(client_flag, db_name);
init_embedded_mysql(mysql, client_flag, db_name); init_embedded_mysql(mysql, client_flag, db_name);
...@@ -243,7 +254,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -243,7 +254,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
DBUG_RETURN(mysql); DBUG_RETURN(mysql);
error: error:
embedded_get_error(mysql);
DBUG_PRINT("error",("message: %u (%s)", mysql->net.last_errno, DBUG_PRINT("error",("message: %u (%s)", mysql->net.last_errno,
mysql->net.last_error)); mysql->net.last_error));
{ {
......
...@@ -3,5 +3,12 @@ ...@@ -3,5 +3,12 @@
--source include/not_windows.inc --source include/not_windows.inc
# check that CSV engine was compiled in, as IM the test suite uses
# logs tables-specific option and the option is not present if CSV
# (and => the log tables) are not in.
# NOTE: In future we should remove this check and make the test suite
# to pass correct opyions to IM depending on the CSV presence
--source include/have_csv.inc
--connection default --connection default
--disconnect dflt_server_con --disconnect dflt_server_con
This diff is collapsed.
# include/partition_10.inc
#
# Do some basic checks on a table.
#
# FIXME: Do not write the statements and results, if SQL return code = 0
# and result set like expected. Write a message, that all is like
# expected instead.
#
# All SELECTs are so written, that we get my_value = 1, when everything
# is like expected.
#
--source include/partition_layout.inc
####### Variations with multiple records
# Select on empty table
SELECT COUNT(*) = 0 AS my_value FROM t1;
# (mass) Insert of $max_row records
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row;
# Select
eval SELECT (COUNT(*) = $max_row) AND (MIN(f1) = 1) AND (MAX(f1) = $max_row)
AS my_value FROM t1;
# DEBUG SELECT COUNT(*),MIN(f1),MAX(f1) FROM t1;
# (mass) Update $max_row_div4 * 2 + 1 records
eval UPDATE t1 SET f1 = f1 + $max_row
WHERE f1 BETWEEN $max_row_div2 - $max_row_div4 AND $max_row_div2 + $max_row_div4;
# Select
eval SELECT (COUNT(*) = $max_row) AND (MIN(f1) = 1) AND (MAX(f1) = $max_row_div2 + $max_row_div4 + $max_row )
AS my_value FROM t1;
# DEBUG SELECT COUNT(*),MIN(f1),MAX(f1) FROM t1;
# (mass) Delete $max_row_div4 * 2 + 1 records
eval DELETE FROM t1
WHERE f1 BETWEEN $max_row_div2 - $max_row_div4 + $max_row AND $max_row_div2 + $max_row_div4 + $max_row;
# Select
eval SELECT (COUNT(*) = $max_row - $max_row_div4 - $max_row_div4 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = $max_row)
AS my_value FROM t1;
# DEBUG SELECT COUNT(*),MIN(f1),MAX(f1) FROM t1;
####### Variations with single records
# Insert one record at beginning
INSERT INTO t1 SET f1 = 0 , f2 = '#######';
# Select this record
SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
# Insert one record at end
eval INSERT INTO t1 SET f1 = $max_row + 1, f2 = '#######';
# Select this record
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 1 AND f2 = '#######';
# Update one record
eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
# Truncate
TRUNCATE t1;
# Select on empty table
SELECT COUNT(*) = 0 AS my_value FROM t1;
# include/partition_11.inc
#
# Try to create a table with the given partition number
#
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) PARTITIONS $part_number;
--disable_query_log
eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`;
--enable_query_log
#
# If this operation was successfull, check + drop this table
if ($run)
{
--source include/partition_10.inc
eval DROP TABLE t1;
}
#### Try to create a table with the given subpartition number
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1)
SUBPARTITIONS $part_number
(PARTITION part1 VALUES LESS THAN ($max_row_div2), PARTITION part2 VALUES LESS THAN ($max_int_4));
--disable_query_log
eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`;
--enable_query_log
#
# If this operation was successfull, check + drop this table
if ($run)
{
--source include/partition_10.inc
eval DROP TABLE t1;
}
# include/partition_12.inc
#
# Do some basic things on a table, if the SQL command executed just before
# sourcing this file was successful.
#
--source include/partition_layout.inc
####### Variations with multiple records
# (mass) Insert max_row_div2 + 1 records
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN $max_row_div2 AND $max_row;
# Select
eval SELECT (COUNT(*) = $max_row) AND (MIN(f1) = 1) AND (MAX(f1) = $max_row)
AS my_value FROM t1;
# DEBUG SELECT COUNT(*),MIN(f1),MAX(f1) FROM t1;
# (mass) Update $max_row_div4 * 2 + 1 records
eval UPDATE t1 SET f1 = f1 + $max_row
WHERE f1 BETWEEN $max_row_div2 - $max_row_div4 AND $max_row_div2 + $max_row_div4;
# Select
eval SELECT (COUNT(*) = $max_row) AND (MIN(f1) = 1) AND (MAX(f1) = $max_row_div2 + $max_row_div4 + $max_row )
AS my_value FROM t1;
# DEBUG SELECT COUNT(*),MIN(f1),MAX(f1) FROM t1;
# (mass) Delete $max_row_div4 * 2 + 1 records
eval DELETE FROM t1
WHERE f1 BETWEEN $max_row_div2 - $max_row_div4 + $max_row AND $max_row_div2 + $max_row_div4 + $max_row;
# Select
eval SELECT (COUNT(*) = $max_row - $max_row_div4 - $max_row_div4 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = $max_row)
AS my_value FROM t1;
# DEBUG SELECT COUNT(*),MIN(f1),MAX(f1) FROM t1;
####### Variations with single records
# Insert one record at beginning
INSERT INTO t1 SET f1 = 0 , f2 = '#######';
# Select this record
SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######';
# Insert one record at end
eval INSERT INTO t1 SET f1 = $max_row + 1, f2 = '#######';
# Select this record
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 1 AND f2 = '#######';
# Update one record
eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
# Truncate
TRUNCATE t1;
# Select on empty table
SELECT COUNT(*) = 0 AS my_value FROM t1;
# include/partition_layout.inc
#
# Print partitioning related informations about the table t1
#
eval SHOW CREATE TABLE t1;
# Optional (most probably issues with separators and case sensitivity)
# listing of files belonging to the table t1
if ($ls)
{
--exec ls var/master-data/test/t1*
}
...@@ -13,3 +13,5 @@ show create table columns_priv; ...@@ -13,3 +13,5 @@ show create table columns_priv;
show create table procs_priv; show create table procs_priv;
show create table proc; show create table proc;
show create table event; show create table event;
show create table general_log;
show create table slow_log;
...@@ -570,6 +570,10 @@ CREATE TABLE proc ( ...@@ -570,6 +570,10 @@ CREATE TABLE proc (
) character set utf8 comment='Stored Procedures'; ) character set utf8 comment='Stored Procedures';
CREATE PROCEDURE create_log_tables() BEGIN DECLARE is_csv_enabled int DEFAULT 0; SELECT @@have_csv = 'YES' INTO is_csv_enabled; IF (is_csv_enabled) THEN CREATE TABLE general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT, thread_id INTEGER, server_id INTEGER, command_type VARCHAR(64), argument MEDIUMTEXT) engine=CSV CHARACTER SET utf8 comment='General log'; CREATE TABLE slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512), last_insert_id INTEGER, insert_id INTEGER, server_id INTEGER, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment='Slow log'; END IF; END;
CALL create_log_tables();
DROP PROCEDURE create_log_tables;
CREATE TABLE event ( CREATE TABLE event (
db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
name char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
......
...@@ -517,6 +517,7 @@ sub command_line_setup () { ...@@ -517,6 +517,7 @@ sub command_line_setup () {
$opt_master_myport= $ENV{'MTR_BUILD_THREAD'} * 40 + 8120; $opt_master_myport= $ENV{'MTR_BUILD_THREAD'} * 40 + 8120;
$opt_slave_myport= $opt_master_myport + 16; $opt_slave_myport= $opt_master_myport + 16;
$opt_ndbcluster_port= $opt_master_myport + 24; $opt_ndbcluster_port= $opt_master_myport + 24;
$opt_ndbcluster_port_slave= $opt_master_myport + 32;
$im_port= $opt_master_myport + 10; $im_port= $opt_master_myport + 10;
$im_mysqld1_port= $opt_master_myport + 12; $im_mysqld1_port= $opt_master_myport + 12;
$im_mysqld2_port= $opt_master_myport + 14; $im_mysqld2_port= $opt_master_myport + 14;
...@@ -711,6 +712,8 @@ sub command_line_setup () { ...@@ -711,6 +712,8 @@ sub command_line_setup () {
$glob_use_embedded_server= 1; $glob_use_embedded_server= 1;
push(@glob_test_mode, "embedded"); push(@glob_test_mode, "embedded");
$opt_skip_rpl= 1; # We never run replication with embedded $opt_skip_rpl= 1; # We never run replication with embedded
$opt_skip_ndbcluster= 1; # Avoid auto detection
$opt_skip_ssl= 1;
if ( $opt_extern ) if ( $opt_extern )
{ {
...@@ -909,6 +912,7 @@ sub command_line_setup () { ...@@ -909,6 +912,7 @@ sub command_line_setup () {
path_datadir => "$opt_vardir/im_mysqld_1.data", path_datadir => "$opt_vardir/im_mysqld_1.data",
path_sock => "$sockdir/mysqld_1.sock", path_sock => "$sockdir/mysqld_1.sock",
path_pid => "$opt_vardir/run/mysqld_1.pid", path_pid => "$opt_vardir/run/mysqld_1.pid",
old_log_format => 1
}; };
$instance_manager->{'instances'}->[1]= $instance_manager->{'instances'}->[1]=
...@@ -919,6 +923,7 @@ sub command_line_setup () { ...@@ -919,6 +923,7 @@ sub command_line_setup () {
path_sock => "$sockdir/mysqld_2.sock", path_sock => "$sockdir/mysqld_2.sock",
path_pid => "$opt_vardir/run/mysqld_2.pid", path_pid => "$opt_vardir/run/mysqld_2.pid",
nonguarded => 1, nonguarded => 1,
old_log_format => 1
}; };
if ( $opt_extern ) if ( $opt_extern )
...@@ -1118,6 +1123,9 @@ sub environment_setup () { ...@@ -1118,6 +1123,9 @@ sub environment_setup () {
# $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME # $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME
$ENV{'MYSQL_TCP_PORT'}= 3306; $ENV{'MYSQL_TCP_PORT'}= 3306;
$ENV{'NDBCLUSTER_PORT'}= $opt_ndbcluster_port;
$ENV{'NDBCLUSTER_PORT_SLAVE'}=$opt_ndbcluster_port_slave;
$ENV{'IM_PATH_PID'}= $instance_manager->{path_pid}; $ENV{'IM_PATH_PID'}= $instance_manager->{path_pid};
$ENV{'IM_MYSQLD1_SOCK'}= $instance_manager->{instances}->[0]->{path_sock}; $ENV{'IM_MYSQLD1_SOCK'}= $instance_manager->{instances}->[0]->{path_sock};
...@@ -1142,7 +1150,8 @@ sub environment_setup () { ...@@ -1142,7 +1150,8 @@ sub environment_setup () {
print "Using MASTER_MYPORT = $ENV{MASTER_MYPORT}\n"; print "Using MASTER_MYPORT = $ENV{MASTER_MYPORT}\n";
print "Using MASTER_MYPORT1 = $ENV{MASTER_MYPORT1}\n"; print "Using MASTER_MYPORT1 = $ENV{MASTER_MYPORT1}\n";
print "Using SLAVE_MYPORT = $ENV{SLAVE_MYPORT}\n"; print "Using SLAVE_MYPORT = $ENV{SLAVE_MYPORT}\n";
print "Using NDBCLUSTER_PORT = $opt_ndbcluster_port\n"; print "Using NDBCLUSTER_PORT = $ENV{NDBCLUSTER_PORT}\n";
print "Using NDBCLUSTER_PORT_SLAVE = $ENV{NDBCLUSTER_PORT_SLAVE}\n";
print "Using IM_MYSQLD1_PORT = $ENV{'IM_MYSQLD1_PORT'}\n"; print "Using IM_MYSQLD1_PORT = $ENV{'IM_MYSQLD1_PORT'}\n";
print "Using IM_MYSQLD2_PORT = $ENV{'IM_MYSQLD2_PORT'}\n"; print "Using IM_MYSQLD2_PORT = $ENV{'IM_MYSQLD2_PORT'}\n";
} }
...@@ -1364,7 +1373,8 @@ sub ndbcluster_install () { ...@@ -1364,7 +1373,8 @@ sub ndbcluster_install () {
"--data-dir=$opt_vardir", "--data-dir=$opt_vardir",
"--verbose=2", "--verbose=2",
$ndbcluster_opts, $ndbcluster_opts,
"--initial"], "--initial",
"--relative-config-data-dir"],
"", "", "", "") ) "", "", "", "") )
{ {
mtr_error("Error ndbcluster_install"); mtr_error("Error ndbcluster_install");
...@@ -1456,7 +1466,8 @@ sub ndbcluster_install_slave () { ...@@ -1456,7 +1466,8 @@ sub ndbcluster_install_slave () {
"--verbose=2", "--verbose=2",
"--small", "--small",
"--ndbd-nodes=1", "--ndbd-nodes=1",
"--initial"], "--initial",
"--relative-config-data-dir"],
"", "", "", "") ) "", "", "", "") )
{ {
mtr_error("Error ndbcluster_install_slave"); mtr_error("Error ndbcluster_install_slave");
...@@ -1821,6 +1832,7 @@ EOF ...@@ -1821,6 +1832,7 @@ EOF
; ;
print OUT "nonguarded\n" if $instance->{'nonguarded'}; print OUT "nonguarded\n" if $instance->{'nonguarded'};
print OUT "old-log-format\n" if $instance->{'old_log_format'};
print OUT "\n"; print OUT "\n";
} }
......
...@@ -268,9 +268,11 @@ USE_RUNNING_SERVER=0 ...@@ -268,9 +268,11 @@ USE_RUNNING_SERVER=0
USE_NDBCLUSTER=@USE_NDBCLUSTER@ USE_NDBCLUSTER=@USE_NDBCLUSTER@
USE_NDBCLUSTER_SLAVE=@USE_NDBCLUSTER@ USE_NDBCLUSTER_SLAVE=@USE_NDBCLUSTER@
USE_NDBCLUSTER_ALL=0 USE_NDBCLUSTER_ALL=0
USE_NDBCLUSTER_ONLY=0
USE_RUNNING_NDBCLUSTER="" USE_RUNNING_NDBCLUSTER=""
USE_RUNNING_NDBCLUSTER_SLAVE="" USE_RUNNING_NDBCLUSTER_SLAVE=""
NDB_EXTRA_TEST=0 NDB_EXTRA_TEST=0
NDB_VERBOSE=0
NDBCLUSTER_EXTRA_OPTS="" NDBCLUSTER_EXTRA_OPTS=""
USE_PURIFY="" USE_PURIFY=""
PURIFY_LOGS="" PURIFY_LOGS=""
...@@ -297,6 +299,7 @@ TEST_MODE="" ...@@ -297,6 +299,7 @@ TEST_MODE=""
NDB_MGM_EXTRA_OPTS= NDB_MGM_EXTRA_OPTS=
NDB_MGMD_EXTRA_OPTS= NDB_MGMD_EXTRA_OPTS=
NDBD_EXTRA_OPTS= NDBD_EXTRA_OPTS=
MASTER_MYSQLDBINLOG=1
SLAVE_MYSQLDBINLOG=1 SLAVE_MYSQLDBINLOG=1
DO_STRESS="" DO_STRESS=""
...@@ -316,6 +319,8 @@ while test $# -gt 0; do ...@@ -316,6 +319,8 @@ while test $# -gt 0; do
USE_EMBEDDED_SERVER=1 USE_EMBEDDED_SERVER=1
USE_MANAGER=0 NO_SLAVE=1 USE_MANAGER=0 NO_SLAVE=1
USE_RUNNING_SERVER=0 USE_RUNNING_SERVER=0
USE_NDBCLUSTER=""
USE_NDBCLUSTER_SLAVE=""
TEST_MODE="$TEST_MODE embedded" ;; TEST_MODE="$TEST_MODE embedded" ;;
--purify) --purify)
USE_PURIFY=1 USE_PURIFY=1
...@@ -341,6 +346,10 @@ while test $# -gt 0; do ...@@ -341,6 +346,10 @@ while test $# -gt 0; do
USE_NDBCLUSTER="--ndbcluster" USE_NDBCLUSTER="--ndbcluster"
USE_NDBCLUSTER_SLAVE="--ndbcluster" USE_NDBCLUSTER_SLAVE="--ndbcluster"
USE_NDBCLUSTER_ALL=1 ;; USE_NDBCLUSTER_ALL=1 ;;
--with-ndbcluster-only)
USE_NDBCLUSTER="--ndbcluster"
USE_NDBCLUSTER_SLAVE="--ndbcluster"
USE_NDBCLUSTER_ONLY=1 ;;
--ndb-connectstring=*) --ndb-connectstring=*)
USE_NDBCLUSTER="--ndbcluster" ; USE_NDBCLUSTER="--ndbcluster" ;
USE_RUNNING_NDBCLUSTER=`$ECHO "$1" | $SED -e "s;--ndb-connectstring=;;"` ;; USE_RUNNING_NDBCLUSTER=`$ECHO "$1" | $SED -e "s;--ndb-connectstring=;;"` ;;
...@@ -351,6 +360,8 @@ while test $# -gt 0; do ...@@ -351,6 +360,8 @@ while test $# -gt 0; do
NDBCLUSTER_EXTRA_OPTS=" " NDBCLUSTER_EXTRA_OPTS=" "
NDB_EXTRA_TEST=1 ; NDB_EXTRA_TEST=1 ;
;; ;;
--ndb-verbose)
NDB_VERBOSE=2 ;;
--ndb_mgm-extra-opts=*) --ndb_mgm-extra-opts=*)
NDB_MGM_EXTRA_OPTS=`$ECHO "$1" | $SED -e "s;--ndb_mgm-extra-opts=;;"` ;; NDB_MGM_EXTRA_OPTS=`$ECHO "$1" | $SED -e "s;--ndb_mgm-extra-opts=;;"` ;;
--ndb_mgmd-extra-opts=*) --ndb_mgmd-extra-opts=*)
...@@ -543,6 +554,7 @@ while test $# -gt 0; do ...@@ -543,6 +554,7 @@ while test $# -gt 0; do
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-ndbcluster" EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-ndbcluster"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-ndbcluster" EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-ndbcluster"
;; ;;
--skip-master-binlog) MASTER_MYSQLDBINLOG=0 ;;
--skip-slave-binlog) SLAVE_MYSQLDBINLOG=0 ;; --skip-slave-binlog) SLAVE_MYSQLDBINLOG=0 ;;
--skip-*) --skip-*)
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $1" EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $1"
...@@ -1266,8 +1278,10 @@ start_ndbcluster() ...@@ -1266,8 +1278,10 @@ start_ndbcluster()
then then
NDBCLUSTER_EXTRA_OPTS="--small" NDBCLUSTER_EXTRA_OPTS="--small"
fi fi
OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --verbose=2 --initial" OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --verbose=$NDB_VERBOSE --initial --relative-config-data-dir"
if [ "x$NDB_VERBOSE" != "x0" ] ; then
echo "Starting master ndbcluster " $OPTS echo "Starting master ndbcluster " $OPTS
fi
./ndb/ndbcluster $OPTS || NDB_STATUS_OK=0 ./ndb/ndbcluster $OPTS || NDB_STATUS_OK=0
if [ x$NDB_STATUS_OK != x1 ] ; then if [ x$NDB_STATUS_OK != x1 ] ; then
if [ x$FORCE != x1 ] ; then if [ x$FORCE != x1 ] ; then
...@@ -1351,9 +1365,13 @@ start_master() ...@@ -1351,9 +1365,13 @@ start_master()
then then
CURR_MASTER_MYSQLD_TRACE="$EXTRA_MASTER_MYSQLD_TRACE$1" CURR_MASTER_MYSQLD_TRACE="$EXTRA_MASTER_MYSQLD_TRACE$1"
fi fi
if [ x$MASTER_MYSQLDBINLOG = x1 ]
then
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --log-bin=$MYSQL_TEST_DIR/var/log/master-bin$1"
fi
if [ -z "$DO_BENCH" -a -z "$DO_STRESS" ] if [ -z "$DO_BENCH" -a -z "$DO_STRESS" ]
then then
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin$1 \ master_args="--no-defaults \
--server-id=$id \ --server-id=$id \
--basedir=$MY_BASEDIR \ --basedir=$MY_BASEDIR \
--port=$this_master_myport \ --port=$this_master_myport \
...@@ -1379,7 +1397,7 @@ start_master() ...@@ -1379,7 +1397,7 @@ start_master()
$EXTRA_MASTER_MYSQLD_OPT $EXTRA_MASTER_OPT \ $EXTRA_MASTER_MYSQLD_OPT $EXTRA_MASTER_OPT \
$NOT_FIRST_MASTER_EXTRA_OPTS $CURR_MASTER_MYSQLD_TRACE" $NOT_FIRST_MASTER_EXTRA_OPTS $CURR_MASTER_MYSQLD_TRACE"
else else
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin$1 \ master_args="--no-defaults \
--server-id=$id --rpl-recovery-rank=1 \ --server-id=$id --rpl-recovery-rank=1 \
--basedir=$MY_BASEDIR --init-rpl-role=master \ --basedir=$MY_BASEDIR --init-rpl-role=master \
--port=$this_master_myport \ --port=$this_master_myport \
...@@ -1493,8 +1511,10 @@ start_slave() ...@@ -1493,8 +1511,10 @@ start_slave()
NDBCLUSTER_EXTRA_OPTS="--small" NDBCLUSTER_EXTRA_OPTS="--small"
fi fi
OPTS="$NDBCLUSTER_OPTS_SLAVE --initial $NDBCLUSTER_EXTRA_OPTS --ndbd-nodes=1 --verbose=2" OPTS="$NDBCLUSTER_OPTS_SLAVE --initial $NDBCLUSTER_EXTRA_OPTS --ndbd-nodes=1 --verbose=$NDB_VERBOSE --relative-config-data-dir"
if [ "x$NDB_VERBOSE" != "x0" ] ; then
echo "Starting slave ndbcluster " $OPTS echo "Starting slave ndbcluster " $OPTS
fi
./ndb/ndbcluster $OPTS \ ./ndb/ndbcluster $OPTS \
|| NDB_SLAVE_STATUS_OK=0 || NDB_SLAVE_STATUS_OK=0
# > /dev/null 2>&1 || NDB_SLAVE_STATUS_OK=0 # > /dev/null 2>&1 || NDB_SLAVE_STATUS_OK=0
...@@ -1750,6 +1770,10 @@ run_testcase () ...@@ -1750,6 +1770,10 @@ run_testcase ()
if [ "x$USE_NDBCLUSTER_ALL" = "x1" ] ; then if [ "x$USE_NDBCLUSTER_ALL" = "x1" ] ; then
NDBCLUSTER_TEST=1 NDBCLUSTER_TEST=1
fi fi
if [ "x$USE_NDBCLUSTER_ONLY" = "x1" -a "x$NDBCLUSTER_TEST" != "x1" ] ; then
skip_test $tname
return
fi
if [ "$USE_MANAGER" = 1 ] ; then if [ "$USE_MANAGER" = 1 ] ; then
many_slaves=`$EXPR \( \( $tname : rpl_failsafe \) != 0 \) \| \( \( $tname : rpl_chain_temp_table \) != 0 \)` many_slaves=`$EXPR \( \( $tname : rpl_failsafe \) != 0 \) \| \( \( $tname : rpl_chain_temp_table \) != 0 \)`
fi fi
......
...@@ -52,6 +52,7 @@ initial_ndb= ...@@ -52,6 +52,7 @@ initial_ndb=
status_ndb= status_ndb=
ndb_diskless=0 ndb_diskless=0
ndbd_nodes=2 ndbd_nodes=2
relative_config_data_dir=
ndb_no_ord=512 ndb_no_ord=512
ndb_no_attr=2048 ndb_no_attr=2048
...@@ -89,7 +90,7 @@ while test $# -gt 0; do ...@@ -89,7 +90,7 @@ while test $# -gt 0; do
--small) --small)
ndb_no_ord=32 ndb_no_ord=32
ndb_con_op=5000 ndb_con_op=5000
ndb_dmem=10M ndb_dmem=20M
ndb_imem=1M ndb_imem=1M
ndb_pbmem=4M ndb_pbmem=4M
;; ;;
...@@ -99,6 +100,9 @@ while test $# -gt 0; do ...@@ -99,6 +100,9 @@ while test $# -gt 0; do
--data-dir=*) --data-dir=*)
fsdir=`echo "$1" | sed -e "s;--data-dir=;;"` fsdir=`echo "$1" | sed -e "s;--data-dir=;;"`
;; ;;
--relative-config-data-dir)
relative_config_data_dir=1
;;
--port=*) --port=*)
port=`echo "$1" | sed -e "s;--port=;;"` port=`echo "$1" | sed -e "s;--port=;;"`
;; ;;
...@@ -196,6 +200,11 @@ fi ...@@ -196,6 +200,11 @@ fi
# Start management server as deamon # Start management server as deamon
# Edit file system path and ports in config file # Edit file system path and ports in config file
if [ $relative_config_data_dir ] ; then
config_fs_ndb="."
else
config_fs_ndb=$fs_ndb
fi
if [ $initial_ndb ] ; then if [ $initial_ndb ] ; then
rm -rf $fs_ndb/ndb_* 2>&1 | cat > /dev/null rm -rf $fs_ndb/ndb_* 2>&1 | cat > /dev/null
sed \ sed \
...@@ -206,7 +215,7 @@ if [ $initial_ndb ] ; then ...@@ -206,7 +215,7 @@ if [ $initial_ndb ] ; then
-e s,"CHOOSE_IndexMemory","$ndb_imem",g \ -e s,"CHOOSE_IndexMemory","$ndb_imem",g \
-e s,"CHOOSE_Diskless","$ndb_diskless",g \ -e s,"CHOOSE_Diskless","$ndb_diskless",g \
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \ -e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
-e s,"CHOOSE_FILESYSTEM","$fs_ndb",g \ -e s,"CHOOSE_FILESYSTEM","$config_fs_ndb",g \
-e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \ -e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \
-e s,"CHOOSE_DiskPageBufferMemory","$ndb_pbmem",g \ -e s,"CHOOSE_DiskPageBufferMemory","$ndb_pbmem",g \
< "$config_ini" \ < "$config_ini" \
......
...@@ -5,6 +5,7 @@ columns_priv ...@@ -5,6 +5,7 @@ columns_priv
db db
event event
func func
general_log
help_category help_category
help_keyword help_keyword
help_relation help_relation
...@@ -13,6 +14,7 @@ host ...@@ -13,6 +14,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
slow_log
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -34,6 +36,7 @@ columns_priv ...@@ -34,6 +36,7 @@ columns_priv
db db
event event
func func
general_log
help_category help_category
help_keyword help_keyword
help_relation help_relation
...@@ -42,6 +45,7 @@ host ...@@ -42,6 +45,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
slow_log
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -71,6 +75,7 @@ columns_priv ...@@ -71,6 +75,7 @@ columns_priv
db db
event event
func func
general_log
help_category help_category
help_keyword help_keyword
help_relation help_relation
...@@ -79,6 +84,7 @@ host ...@@ -79,6 +84,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
slow_log
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
......
...@@ -4976,6 +4976,23 @@ c1 ...@@ -4976,6 +4976,23 @@ c1
4 4
5 5
DROP TABLE bug14672; DROP TABLE bug14672;
CREATE TABLE test_concurrent_insert ( val integer ) ENGINE = CSV;
LOCK TABLES test_concurrent_insert READ LOCAL;
INSERT INTO test_concurrent_insert VALUES (1);
SELECT * FROM test_concurrent_insert;
val
1
SELECT * FROM test_concurrent_insert;
val
UNLOCK TABLES;
LOCK TABLES test_concurrent_insert WRITE;
INSERT INTO test_concurrent_insert VALUES (2);
SELECT * FROM test_concurrent_insert;
val
1
2
UNLOCK TABLES;
DROP TABLE test_concurrent_insert;
create table t1 (a int) engine=csv; create table t1 (a int) engine=csv;
insert t1 values (1); insert t1 values (1);
delete from t1; delete from t1;
......
drop table if exists t1;
set names cp932;
set character_set_database = cp932;
RESET MASTER;
CREATE TABLE t1(f1 blob);
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
SET @var1= x'8300';
EXECUTE stmt1 USING @var1;
SHOW BINLOG EVENTS FROM 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
master-bin.000001 # Table_map 1 # test.t1
master-bin.000001 # Write_rows 1 #
SELECT HEX(f1) FROM t1;
HEX(f1)
8300
DROP table t1;
...@@ -21,6 +21,7 @@ skip-stack-trace VALUE ...@@ -21,6 +21,7 @@ skip-stack-trace VALUE
skip-innodb VALUE skip-innodb VALUE
skip-bdb VALUE skip-bdb VALUE
skip-ndbcluster VALUE skip-ndbcluster VALUE
old-log-format VALUE
SHOW INSTANCE OPTIONS mysqld2; SHOW INSTANCE OPTIONS mysqld2;
option_name value option_name value
instance_name VALUE instance_name VALUE
...@@ -41,6 +42,7 @@ skip-stack-trace VALUE ...@@ -41,6 +42,7 @@ skip-stack-trace VALUE
skip-innodb VALUE skip-innodb VALUE
skip-bdb VALUE skip-bdb VALUE
skip-ndbcluster VALUE skip-ndbcluster VALUE
old-log-format VALUE
START INSTANCE mysqld2; START INSTANCE mysqld2;
STOP INSTANCE mysqld2; STOP INSTANCE mysqld2;
SHOW mysqld1 LOG FILES; SHOW mysqld1 LOG FILES;
......
...@@ -62,6 +62,7 @@ columns_priv ...@@ -62,6 +62,7 @@ columns_priv
db db
event event
func func
general_log
help_category help_category
help_keyword help_keyword
help_relation help_relation
...@@ -70,6 +71,7 @@ host ...@@ -70,6 +71,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
slow_log
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -732,7 +734,7 @@ CREATE TABLE t_crashme ( f1 BIGINT); ...@@ -732,7 +734,7 @@ CREATE TABLE t_crashme ( f1 BIGINT);
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1; CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1; CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
count(*) count(*)
107 109
drop view a2, a1; drop view a2, a1;
drop table t_crashme; drop table t_crashme;
select table_schema,table_name, column_name from select table_schema,table_name, column_name from
...@@ -816,7 +818,7 @@ SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHE ...@@ -816,7 +818,7 @@ SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHE
table_schema count(*) table_schema count(*)
cluster_replication 1 cluster_replication 1
information_schema 19 information_schema 19
mysql 19 mysql 21
create table t1 (i int, j int); create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row create trigger trg1 before insert on t1 for each row
begin begin
......
...@@ -2635,25 +2635,6 @@ checksum table t1; ...@@ -2635,25 +2635,6 @@ checksum table t1;
Table Checksum Table Checksum
test.t1 2050879373 test.t1 2050879373
drop table t1; drop table t1;
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
insert t1 values (1,100);
create function f1 () returns integer begin
declare var1 int;
select col2 into var1 from t1 where col1=1 for update;
return var1;
end|
start transaction;
select f1();
f1()
100
update t1 set col2=0 where col1=1;
select * from t1;
col1 col2
1 100
rollback;
rollback;
drop table t1;
drop function f1;
create table t1 ( create table t1 (
a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2)) a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
) character set utf8 engine = innodb; ) character set utf8 engine = innodb;
......
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
insert t1 values (1,100);
create function f1 () returns integer begin
declare var1 int;
select col2 into var1 from t1 where col1=1 for update;
return var1;
end|
start transaction;
select f1();
f1()
100
update t1 set col2=0 where col1=1;
select * from t1;
col1 col2
1 100
rollback;
rollback;
drop table t1;
drop function f1;
...@@ -139,3 +139,30 @@ a b c ...@@ -139,3 +139,30 @@ a b c
10 NULL Ten 10 NULL Ten
15 NULL Fifteen 15 NULL Fifteen
drop table t1, t2; drop table t1, t2;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1);
SET NAMES latin1;
SET character_set_filesystem=filename;
select @@character_set_filesystem;
@@character_set_filesystem
filename
SELECT * INTO OUTFILE 't-1' FROM t1;
DELETE FROM t1;
LOAD DATA INFILE 't-1' INTO TABLE t1;
SELECT * FROM t1;
a
1
DELETE FROM t1;
SET character_set_filesystem=latin1;
select @@character_set_filesystem;
@@character_set_filesystem
latin1
LOAD DATA INFILE 't@002d1' INTO TABLE t1;
SELECT * FROM t1;
a
1
DROP TABLE t1;
SET character_set_filesystem=default;
select @@character_set_filesystem;
@@character_set_filesystem
binary
use mysql;
truncate table general_log;
select * from general_log;
event_time user_host thread_id server_id command_type argument
TIMESTAMP root[root] @ localhost [] 1 1 Query select * from general_log
truncate table slow_log;
select * from slow_log;
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
truncate table general_log;
select * from general_log where argument like '%general_log%';
event_time user_host thread_id server_id command_type argument
TIMESTAMP root[root] @ localhost [] 1 1 Query select * from general_log where argument like '%general_log%'
create table join_test (verbose_comment varchar (80), command_type varchar(64));
insert into join_test values ("User performed a usual SQL query", "Query");
insert into join_test values ("New DB connection was registered", "Connect");
insert into join_test values ("Get the table info", "Field List");
select verbose_comment, user_host, argument
from mysql.general_log join join_test
on (mysql.general_log.command_type = join_test.command_type);
verbose_comment user_host argument
User performed a usual SQL query root[root] @ localhost [] select * from general_log where argument like '%general_log%'
User performed a usual SQL query root[root] @ localhost [] create table join_test (verbose_comment varchar (80), command_type varchar(64))
User performed a usual SQL query root[root] @ localhost [] insert into join_test values ("User performed a usual SQL query", "Query")
User performed a usual SQL query root[root] @ localhost [] insert into join_test values ("New DB connection was registered", "Connect")
User performed a usual SQL query root[root] @ localhost [] insert into join_test values ("Get the table info", "Field List")
User performed a usual SQL query root[root] @ localhost [] select verbose_comment, user_host, argument
from mysql.general_log join join_test
on (mysql.general_log.command_type = join_test.command_type)
drop table join_test;
flush logs;
lock tables mysql.general_log WRITE;
ERROR HY000: You can't write-lock a log table. Only read access is possible.
lock tables mysql.slow_log WRITE;
ERROR HY000: You can't write-lock a log table. Only read access is possible.
lock tables mysql.general_log READ;
ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL instead.
lock tables mysql.slow_log READ;
ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL instead.
lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL;
unlock tables;
lock tables mysql.general_log READ LOCAL;
flush logs;
unlock tables;
select "Mark that we woke up from flush logs in the test"
as "test passed";
test passed
Mark that we woke up from flush logs in the test
lock tables mysql.general_log READ LOCAL;
truncate mysql.general_log;
unlock tables;
select "Mark that we woke up from TRUNCATE in the test"
as "test passed";
test passed
Mark that we woke up from TRUNCATE in the test
...@@ -3,6 +3,8 @@ mysql.columns_priv OK ...@@ -3,6 +3,8 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.general_log
note : The storage engine for the table doesn't support optimize
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
...@@ -11,6 +13,8 @@ mysql.host OK ...@@ -11,6 +13,8 @@ mysql.host OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.slow_log
note : The storage engine for the table doesn't support optimize
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -22,6 +26,8 @@ mysql.columns_priv OK ...@@ -22,6 +26,8 @@ mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
mysql.func OK mysql.func OK
mysql.general_log
note : The storage engine for the table doesn't support optimize
mysql.help_category OK mysql.help_category OK
mysql.help_keyword OK mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
...@@ -30,6 +36,8 @@ mysql.host OK ...@@ -30,6 +36,8 @@ mysql.host OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.slow_log
note : The storage engine for the table doesn't support optimize
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
......
select -1 as "before_use_test" ; select 0 as "before_use_test" ;
before_use_test before_use_test
-1 0
select otto from (select 1 as otto) as t1; select otto from (select 1 as otto) as t1;
otto otto
1 1
......
...@@ -110,7 +110,7 @@ t3 CREATE TABLE `t3` ( ...@@ -110,7 +110,7 @@ t3 CREATE TABLE `t3` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`name` char(255) default NULL, `name` char(255) default NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
select * from t3; select * from t3;
id name id name
1 Explorer 1 Explorer
......
...@@ -9,7 +9,7 @@ t1 CREATE TABLE `t1` ( ...@@ -9,7 +9,7 @@ t1 CREATE TABLE `t1` (
`pk1` int(11) NOT NULL, `pk1` int(11) NOT NULL,
`b` bit(64) default NULL, `b` bit(64) default NULL,
PRIMARY KEY (`pk1`) PRIMARY KEY (`pk1`)
) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
insert into t1 values insert into t1 values
(0,b'1111111111111111111111111111111111111111111111111111111111111111'), (0,b'1111111111111111111111111111111111111111111111111111111111111111'),
(1,b'1000000000000000000000000000000000000000000000000000000000000000'), (1,b'1000000000000000000000000000000000000000000000000000000000000000'),
......
ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11,
1,localhost,10485760,1048576 2,localhost,10485760,1048576 1,localhost,20971520,1048576 2,localhost,20971520,1048576
1 localhost 10485760 1048576 1 localhost 20971520 1048576
2 localhost 10485760 1048576 2 localhost 20971520 1048576
1 2 1 2
ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11,
ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,, ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,,
......
...@@ -13,7 +13,7 @@ Table Create Table ...@@ -13,7 +13,7 @@ Table Create Table
gis_point CREATE TABLE `gis_point` ( gis_point CREATE TABLE `gis_point` (
`fid` int(11) default NULL, `fid` int(11) default NULL,
`g` point default NULL `g` point default NULL
) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
SHOW FIELDS FROM gis_point; SHOW FIELDS FROM gis_point;
Field Type Null Key Default Extra Field Type Null Key Default Extra
fid int(11) YES NULL fid int(11) YES NULL
...@@ -471,7 +471,7 @@ Table Create Table ...@@ -471,7 +471,7 @@ Table Create Table
gis_point CREATE TABLE `gis_point` ( gis_point CREATE TABLE `gis_point` (
`fid` int(11) default NULL, `fid` int(11) default NULL,
`g` point default NULL `g` point default NULL
) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
SHOW FIELDS FROM gis_point; SHOW FIELDS FROM gis_point;
Field Type Null Key Default Extra Field Type Null Key Default Extra
fid int(11) YES NULL fid int(11) YES NULL
......
...@@ -80,3 +80,12 @@ t1 CREATE TABLE `t1` ( ...@@ -80,3 +80,12 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY USING HASH (`a`,`b`,`c`) PRIMARY KEY USING HASH (`a`,`b`,`c`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (b) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (b)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a int not null primary key)
PARTITION BY KEY(a)
(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
drop table t1;
CREATE TABLE t1 (a int not null primary key);
ALTER TABLE t1
PARTITION BY KEY(a)
(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
drop table t1;
use test; use test;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
id type state logging database schema name
2 UserTable Online Yes cluster_replication def apply_status
1 SystemTable Online Yes sys def NDB$EVENTS_0
3 UserTable Online Yes cluster_replication def schema
0 SystemTable Online Yes sys def SYSTAB_0
NDBT_ProgramExit: 0 - OK
CREATE TABLE `t1_c` ( CREATE TABLE `t1_c` (
`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, `capgoaledatta` smallint(5) unsigned NOT NULL auto_increment,
`goaledatta` char(2) NOT NULL default '', `goaledatta` char(2) NOT NULL default '',
...@@ -225,6 +233,224 @@ from (select * from t9 union ...@@ -225,6 +233,224 @@ from (select * from t9 union
select * from t9_c) a; select * from t9_c) a;
count(*) count(*)
3 3
ALTER TABLE t1_c
PARTITION BY RANGE (`capgoaledatta`)
(PARTITION p0 VALUES LESS THAN MAXVALUE);
ALTER TABLE t2_c
PARTITION BY LIST(`capgotod`)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6));
ALTER TABLE t3_c
PARTITION BY HASH (`CapGoaledatta`);
ALTER TABLE t5_c
PARTITION BY HASH (`capfa`)
PARTITIONS 4;
ALTER TABLE t6_c
PARTITION BY LINEAR HASH (`relatta`)
PARTITIONS 4;
ALTER TABLE t7_c
PARTITION BY LINEAR KEY (`dardtestard`);
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
select count(*) from t1;
count(*)
5
select count(*) from t1_c;
count(*)
5
select count(*)
from (select * from t1 union
select * from t1_c) a;
count(*)
5
select count(*) from t2;
count(*)
6
select count(*) from t2_c;
count(*)
6
select count(*)
from (select * from t2 union
select * from t2_c) a;
count(*)
6
select count(*) from t3;
count(*)
4
select count(*) from t3_c;
count(*)
4
select count(*)
from (select * from t3 union
select * from t3_c) a;
count(*)
4
select count(*) from t4;
count(*)
22
select count(*) from t4_c;
count(*)
22
select count(*)
from (select * from t4 union
select * from t4_c) a;
count(*)
22
select count(*) from t5;
count(*)
3
select count(*) from t5_c;
count(*)
3
select count(*)
from (select * from t5 union
select * from t5_c) a;
count(*)
3
select count(*) from t6;
count(*)
8
select count(*) from t6_c;
count(*)
8
select count(*)
from (select * from t6 union
select * from t6_c) a;
count(*)
8
select count(*) from t7;
count(*)
5
select count(*) from t7_c;
count(*)
5
select count(*)
from (select * from t7 union
select * from t7_c) a;
count(*)
5
select count(*) from t8;
count(*)
3
select count(*) from t8_c;
count(*)
3
select count(*)
from (select * from t8 union
select * from t8_c) a;
count(*)
3
select count(*) from t9;
count(*)
3
select count(*) from t9_c;
count(*)
3
select count(*)
from (select * from t9 union
select * from t9_c) a;
count(*)
3
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
select count(*) from t1;
count(*)
5
select count(*) from t1_c;
count(*)
5
select count(*)
from (select * from t1 union
select * from t1_c) a;
count(*)
5
select count(*) from t2;
count(*)
6
select count(*) from t2_c;
count(*)
6
select count(*)
from (select * from t2 union
select * from t2_c) a;
count(*)
6
select count(*) from t3;
count(*)
4
select count(*) from t3_c;
count(*)
4
select count(*)
from (select * from t3 union
select * from t3_c) a;
count(*)
4
select count(*) from t4;
count(*)
22
select count(*) from t4_c;
count(*)
22
select count(*)
from (select * from t4 union
select * from t4_c) a;
count(*)
22
select count(*) from t5;
count(*)
3
select count(*) from t5_c;
count(*)
3
select count(*)
from (select * from t5 union
select * from t5_c) a;
count(*)
3
select count(*) from t6;
count(*)
8
select count(*) from t6_c;
count(*)
8
select count(*)
from (select * from t6 union
select * from t6_c) a;
count(*)
8
select count(*) from t7;
count(*)
5
select count(*) from t7_c;
count(*)
5
select count(*)
from (select * from t7 union
select * from t7_c) a;
count(*)
5
select count(*) from t8;
count(*)
3
select count(*) from t8_c;
count(*)
3
select count(*)
from (select * from t8 union
select * from t8_c) a;
count(*)
3
select count(*) from t9;
count(*)
3
select count(*) from t9_c;
count(*)
3
select count(*)
from (select * from t9 union
select * from t9_c) a;
count(*)
3
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
Create table test/def/t2_c failed: Translate frm error
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
520093696,1 520093696,2
...@@ -65,6 +65,8 @@ partitions 3 ...@@ -65,6 +65,8 @@ partitions 3
(partition x1 tablespace ts1, (partition x1 tablespace ts1,
partition x2 tablespace ts2, partition x2 tablespace ts2,
partition x3 tablespace ts3); partition x3 tablespace ts3);
CREATE TABLE t2 LIKE t1;
drop table t2;
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
a int not null, a int not null,
...@@ -108,6 +110,127 @@ insert into t1 values (3); ...@@ -108,6 +110,127 @@ insert into t1 values (3);
insert into t1 values (4); insert into t1 values (4);
UNLOCK TABLES; UNLOCK TABLES;
drop table t1; drop table t1;
CREATE TABLE t1 (a int, name VARCHAR(50), purchased DATE)
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (3),
PARTITION p1 VALUES LESS THAN (7),
PARTITION p2 VALUES LESS THAN (9),
PARTITION p3 VALUES LESS THAN (11));
INSERT INTO t1 VALUES
(1, 'desk organiser', '2003-10-15'),
(2, 'CD player', '1993-11-05'),
(3, 'TV set', '1996-03-10'),
(4, 'bookcase', '1982-01-10'),
(5, 'exercise bike', '2004-05-09'),
(6, 'sofa', '1987-06-05'),
(7, 'popcorn maker', '2001-11-22'),
(8, 'acquarium', '1992-08-04'),
(9, 'study desk', '1984-09-16'),
(10, 'lava lamp', '1998-12-25');
SELECT * from t1 ORDER BY a;
a name purchased
1 desk organiser 2003-10-15
2 CD player 1993-11-05
3 TV set 1996-03-10
4 bookcase 1982-01-10
5 exercise bike 2004-05-09
6 sofa 1987-06-05
7 popcorn maker 2001-11-22
8 acquarium 1992-08-04
9 study desk 1984-09-16
10 lava lamp 1998-12-25
ALTER TABLE t1 DROP PARTITION p0;
SELECT * from t1 ORDER BY a;
a name purchased
3 TV set 1996-03-10
4 bookcase 1982-01-10
5 exercise bike 2004-05-09
6 sofa 1987-06-05
7 popcorn maker 2001-11-22
8 acquarium 1992-08-04
9 study desk 1984-09-16
10 lava lamp 1998-12-25
drop table t1;
CREATE TABLE t1 (a int)
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (1,2,3), PARTITION p1 VALUES IN (4,5,6));
insert into t1 values (1),(2),(3),(4),(5),(6);
select * from t1;
a
1
2
3
4
5
6
truncate t1;
select * from t1;
a
truncate t1;
select * from t1;
a
drop table t1;
CREATE TABLE t1 (a int, b int, primary key(a,b))
PARTITION BY KEY(b,a) PARTITIONS 4;
insert into t1 values (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
select * from t1 where a = 4;
a b
4 4
drop table t1;
CREATE TABLE t1 (a int)
PARTITION BY LIST (a)
PARTITIONS 1
(PARTITION x1 VALUES IN (1) ENGINE=MEMORY);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION x1 VALUES IN (1) ENGINE = MEMORY)
drop table t1;
CREATE TABLE t1 (a int, unique(a))
PARTITION BY LIST (a)
(PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
REPLACE t1 SET a = 4;
ERROR HY000: Table has no partition for value 4
drop table t1;
CREATE TABLE t1 (a int)
PARTITION BY LIST (a)
(PARTITION x1 VALUES IN (2), PARTITION x2 VALUES IN (3));
insert into t1 values (2), (3);
insert into t1 values (4);
ERROR HY000: Table has no partition for value 4
insert into t1 values (1);
ERROR HY000: Table has no partition for value 1
drop table t1;
CREATE TABLE t1 (a int)
PARTITION BY HASH(a)
PARTITIONS 5;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (a) PARTITIONS 5
drop table t1;
CREATE TABLE t1 (a int)
PARTITION BY RANGE (a)
(PARTITION x1 VALUES LESS THAN (2));
insert into t1 values (1);
update t1 set a = 5;
ERROR HY000: Table has no partition for value 5
drop table t1;
CREATE TABLE t1 (a int)
PARTITION BY LIST (a)
(PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
drop table t1;
CREATE TABLE `t1` (
`id` int(11) default NULL
) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
SELECT * FROM t1;
id
drop table t1;
CREATE TABLE `t1` ( CREATE TABLE `t1` (
`id` int(11) default NULL `id` int(11) default NULL
) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ; ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
...@@ -119,8 +242,8 @@ create table t1 ...@@ -119,8 +242,8 @@ create table t1
partition by range (a) partition by range (a)
( partition p0 values less than(10), ( partition p0 values less than(10),
partition p1 values less than (20), partition p1 values less than (20),
partition p2 values less than maxvalue); partition p2 values less than (25));
alter table t1 reorganise partition p2 into (partition p2 values less than (30)); alter table t1 reorganize partition p2 into (partition p2 values less than (30));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -139,7 +262,7 @@ PARTITION x6 VALUES LESS THAN (14), ...@@ -139,7 +262,7 @@ PARTITION x6 VALUES LESS THAN (14),
PARTITION x7 VALUES LESS THAN (16), PARTITION x7 VALUES LESS THAN (16),
PARTITION x8 VALUES LESS THAN (18), PARTITION x8 VALUES LESS THAN (18),
PARTITION x9 VALUES LESS THAN (20)); PARTITION x9 VALUES LESS THAN (20));
ALTER TABLE t1 REORGANISE PARTITION x0,x1,x2 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO
(PARTITION x1 VALUES LESS THAN (6)); (PARTITION x1 VALUES LESS THAN (6));
show create table t1; show create table t1;
Table Create Table Table Create Table
......
This diff is collapsed.
This diff is collapsed.
drop table if exists t1;
partition by list (a) partition by list (a)
partitions 3 partitions 3
(partition x1 values in (1,2,9,4) tablespace ts1, (partition x1 values in (1,2,9,4) tablespace ts1,
...@@ -544,6 +545,10 @@ partitions 2 ...@@ -544,6 +545,10 @@ partitions 2
partition x2 values in (5)); partition x2 values in (5));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4, ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4,
partition x2 values in (5))' at line 8 partition x2 values in (5))' at line 8
CREATE TABLE t1 (a int)
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (x1));
ERROR 42S22: Unknown column 'x1' in 'partition function'
CREATE TABLE t1(a int) CREATE TABLE t1(a int)
PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(5)); PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(5));
insert into t1 values (10); insert into t1 values (10);
......
drop table if exists t1;
CREATE TABLE t1 (a int, b int) CREATE TABLE t1 (a int, b int)
PARTITION BY RANGE (a) PARTITION BY RANGE (a)
(PARTITION x0 VALUES LESS THAN (2), (PARTITION x0 VALUES LESS THAN (2),
...@@ -10,48 +11,52 @@ PARTITION x6 VALUES LESS THAN (14), ...@@ -10,48 +11,52 @@ PARTITION x6 VALUES LESS THAN (14),
PARTITION x7 VALUES LESS THAN (16), PARTITION x7 VALUES LESS THAN (16),
PARTITION x8 VALUES LESS THAN (18), PARTITION x8 VALUES LESS THAN (18),
PARTITION x9 VALUES LESS THAN (20)); PARTITION x9 VALUES LESS THAN (20));
ALTER TABLE t1 REORGANISE PARTITION x0,x1 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (2), (PARTITION x01 VALUES LESS THAN (2),
PARTITION x11 VALUES LESS THAN (5)); PARTITION x11 VALUES LESS THAN (5));
ERROR HY000: The new partitions cover a bigger range then the reorganised partitions do ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x3, x3; ALTER TABLE t1 DROP PARTITION x0, x1, x2, x3, x3;
ERROR HY000: Error in list of partitions to change ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x10; ALTER TABLE t1 DROP PARTITION x0, x1, x2, x10;
ERROR HY000: Error in list of partitions to change ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x1; ALTER TABLE t1 DROP PARTITION x10, x1, x2, x1;
ERROR HY000: Error in list of partitions to change ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3; ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3;
ERROR HY000: Error in list of partitions to change ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 REORGANISE PARTITION x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 INTO
(PARTITION x11 VALUES LESS THAN (22)); (PARTITION x11 VALUES LESS THAN (22));
ERROR HY000: More partitions to reorganise than there are partitions ERROR HY000: More partitions to reorganise than there are partitions
ALTER TABLE t1 REORGANISE PARTITION x0,x1,x2 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO
(PARTITION x3 VALUES LESS THAN (6)); (PARTITION x3 VALUES LESS THAN (6));
ERROR HY000: All partitions must have unique names in the table ERROR HY000: Duplicate partition name x3
ALTER TABLE t1 REORGANISE PARTITION x0, x2 INTO ALTER TABLE t1 REORGANIZE PARTITION x0, x2 INTO
(PARTITION x11 VALUES LESS THAN (2)); (PARTITION x11 VALUES LESS THAN (2));
ERROR HY000: When reorganising a set of partitions they must be in consecutive order ERROR HY000: When reorganising a set of partitions they must be in consecutive order
ALTER TABLE t1 REORGANISE PARTITION x0, x1, x1 INTO ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO
(PARTITION x11 VALUES LESS THAN (4)); (PARTITION x11 VALUES LESS THAN (4));
ERROR HY000: Error in list of partitions to change ERROR HY000: Error in list of partitions to REORGANIZE
ALTER TABLE t1 REORGANISE PARTITION x0,x1 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (5)); (PARTITION x01 VALUES LESS THAN (5));
ERROR HY000: The new partitions cover a bigger range then the reorganised partitions do ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range
ALTER TABLE t1 REORGANISE PARTITION x0,x1 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (4), (PARTITION x01 VALUES LESS THAN (4),
PARTITION x11 VALUES LESS THAN (2)); PARTITION x11 VALUES LESS THAN (2));
ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range
ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (6),
PARTITION x11 VALUES LESS THAN (4));
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a int) CREATE TABLE t1 (a int)
PARTITION BY KEY (a) PARTITION BY KEY (a)
PARTITIONS 2; PARTITIONS 2;
ALTER TABLE t1 ADD PARTITION (PARTITION p1); ALTER TABLE t1 ADD PARTITION (PARTITION p1);
ERROR HY000: All partitions must have unique names in the table ERROR HY000: Duplicate partition name p1
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a int) CREATE TABLE t1 (a int)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION x0, PARTITION x1, PARTITION x2, PARTITION x3, PARTITION x3); (PARTITION x0, PARTITION x1, PARTITION x2, PARTITION x3, PARTITION x3);
ERROR HY000: All partitions must have unique names in the table ERROR HY000: Duplicate partition name x3
CREATE TABLE t1 (a int) CREATE TABLE t1 (a int)
PARTITION BY RANGE (a) PARTITION BY RANGE (a)
SUBPARTITION BY KEY (a) SUBPARTITION BY KEY (a)
...@@ -100,7 +105,7 @@ PARTITION x1 VALUES LESS THAN (8)); ...@@ -100,7 +105,7 @@ PARTITION x1 VALUES LESS THAN (8));
ALTER TABLE t1 ADD PARTITION PARTITIONS 1; ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
ERROR HY000: For RANGE partitions each partition must be defined ERROR HY000: For RANGE partitions each partition must be defined
ALTER TABLE t1 DROP PARTITION x2; ALTER TABLE t1 DROP PARTITION x2;
ERROR HY000: Error in list of partitions to change ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 COALESCE PARTITION 1; ALTER TABLE t1 COALESCE PARTITION 1;
ERROR HY000: COALESCE PARTITION can only be used on HASH/KEY partitions ERROR HY000: COALESCE PARTITION can only be used on HASH/KEY partitions
ALTER TABLE t1 DROP PARTITION x1; ALTER TABLE t1 DROP PARTITION x1;
......
...@@ -1105,56 +1105,20 @@ call f1(); ...@@ -1105,56 +1105,20 @@ call f1();
s1 s1
s1 s1
s1 s1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 3
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 3
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 0
call f1(); call f1();
s1 s1
s1 s1
s1 s1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 3
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 3
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 3
call f1(); call f1();
s1 s1
s1 s1
s1 s1
select sql_cache * from t1; select sql_cache * from t1;
s1 s1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 4
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 4
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 6
insert into t1 values (1); insert into t1 values (1);
select sql_cache * from t1; select sql_cache * from t1;
s1 s1
1 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 5
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 6
call f1(); call f1();
s1 s1
1 1
...@@ -1172,15 +1136,6 @@ s1 ...@@ -1172,15 +1136,6 @@ s1
select sql_cache * from t1; select sql_cache * from t1;
s1 s1
1 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 4
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 8
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 10
flush query cache; flush query cache;
reset query cache; reset query cache;
flush status; flush status;
......
This diff is collapsed.
...@@ -147,10 +147,14 @@ drop table t1; ...@@ -147,10 +147,14 @@ drop table t1;
flush tables; flush tables;
show open tables; show open tables;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql general_log 1 0
mysql slow_log 1 0
create table t1(n int); create table t1(n int);
insert into t1 values (1); insert into t1 values (1);
show open tables; show open tables;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql general_log 1 0
mysql slow_log 1 0
test t1 0 0 test t1 0 0
drop table t1; drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed; create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
...@@ -564,20 +568,24 @@ SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone ...@@ -564,20 +568,24 @@ SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone
1 1
SHOW OPEN TABLES; SHOW OPEN TABLES;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql db 0 0 mysql proc 0 0
test urkunde 0 0 test urkunde 0 0
mysql time_zone 0 0 mysql time_zone 0 0
mysql user 0 0 mysql db 0 0
test txt1 0 0 test txt1 0 0
mysql proc 0 0 mysql slow_log 1 0
test tyt2 0 0 test tyt2 0 0
mysql general_log 1 0
mysql user 0 0
mysql time_zone_name 0 0 mysql time_zone_name 0 0
SHOW OPEN TABLES FROM mysql; SHOW OPEN TABLES FROM mysql;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql db 0 0 mysql proc 0 0
mysql time_zone 0 0 mysql time_zone 0 0
mysql db 0 0
mysql slow_log 1 0
mysql general_log 1 0
mysql user 0 0 mysql user 0 0
mysql proc 0 0
mysql time_zone_name 0 0 mysql time_zone_name 0 0
SHOW OPEN TABLES FROM mysql LIKE 'u%'; SHOW OPEN TABLES FROM mysql LIKE 'u%';
Database Table In_use Name_locked Database Table In_use Name_locked
...@@ -590,12 +598,16 @@ test tyt2 0 0 ...@@ -590,12 +598,16 @@ test tyt2 0 0
mysql time_zone_name 0 0 mysql time_zone_name 0 0
SHOW OPEN TABLES LIKE '%o%'; SHOW OPEN TABLES LIKE '%o%';
Database Table In_use Name_locked Database Table In_use Name_locked
mysql time_zone 0 0
mysql proc 0 0 mysql proc 0 0
mysql time_zone 0 0
mysql slow_log 1 0
mysql general_log 1 0
mysql time_zone_name 0 0 mysql time_zone_name 0 0
FLUSH TABLES; FLUSH TABLES;
SHOW OPEN TABLES; SHOW OPEN TABLES;
Database Table In_use Name_locked Database Table In_use Name_locked
mysql general_log 1 0
mysql slow_log 1 0
DROP TABLE txt1; DROP TABLE txt1;
DROP TABLE tyt2; DROP TABLE tyt2;
DROP TABLE urkunde; DROP TABLE urkunde;
......
...@@ -464,19 +464,6 @@ create table t5 (x int)| ...@@ -464,19 +464,6 @@ create table t5 (x int)|
call bug3294()| call bug3294()|
ERROR 42S02: Unknown table 't5' ERROR 42S02: Unknown table 't5'
drop procedure bug3294| drop procedure bug3294|
drop procedure if exists bug6807|
create procedure bug6807()
begin
declare id int;
set id = connection_id();
kill query id;
select 'Not reached';
end|
call bug6807()|
ERROR 70100: Query execution was interrupted
call bug6807()|
ERROR 70100: Query execution was interrupted
drop procedure bug6807|
drop procedure if exists bug8776_1| drop procedure if exists bug8776_1|
drop procedure if exists bug8776_2| drop procedure if exists bug8776_2|
drop procedure if exists bug8776_3| drop procedure if exists bug8776_3|
......
This diff is collapsed.
This diff is collapsed.
purge master logs before (select adddate(current_timestamp(), interval -4 day));
...@@ -5,6 +5,7 @@ columns_priv ...@@ -5,6 +5,7 @@ columns_priv
db db
event event
func func
general_log
help_category help_category
help_keyword help_keyword
help_relation help_relation
...@@ -13,6 +14,7 @@ host ...@@ -13,6 +14,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
slow_log
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -184,6 +186,31 @@ proc CREATE TABLE `proc` ( ...@@ -184,6 +186,31 @@ proc CREATE TABLE `proc` (
`comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '',
PRIMARY KEY (`db`,`name`,`type`) PRIMARY KEY (`db`,`name`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_host` mediumtext,
`thread_id` int(11) default NULL,
`server_id` int(11) default NULL,
`command_type` varchar(64) default NULL,
`argument` mediumtext
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
show create table slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
`start_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL,
`query_time` time NOT NULL,
`lock_time` time NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
`db` varchar(512) default NULL,
`last_insert_id` int(11) default NULL,
`insert_id` int(11) default NULL,
`server_id` int(11) default NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table event; show create table event;
Table Create Table Table Create Table
event CREATE TABLE `event` ( event CREATE TABLE `event` (
......
...@@ -2213,15 +2213,6 @@ r_object_id users_names ...@@ -2213,15 +2213,6 @@ r_object_id users_names
120001a080000542 guser02 120001a080000542 guser02
drop view v1, v2; drop view v1, v2;
drop table t1, t2; drop table t1, t2;
create definer=some_user@`` sql security invoker view v1 as select 1;
ERROR HY000: Definer is not fully qualified
create definer=some_user@localhost sql security invoker view v1 as select 1;
Warnings:
Note 1449 There is no 'some_user'@'localhost' registered
show create view v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`localhost` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1`
drop view v1;
create table t1 (s1 int); create table t1 (s1 int);
create view abc as select * from t1 as abc; create view abc as select * from t1 as abc;
drop table t1; drop table t1;
......
...@@ -520,3 +520,12 @@ use test; ...@@ -520,3 +520,12 @@ use test;
use test; use test;
drop user mysqltest_1@localhost; drop user mysqltest_1@localhost;
drop database mysqltest; drop database mysqltest;
create definer=some_user@`` sql security invoker view v1 as select 1;
ERROR HY000: Definer is not fully qualified
create definer=some_user@localhost sql security invoker view v1 as select 1;
Warnings:
Note 1449 There is no 'some_user'@'localhost' registered
show create view v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`localhost` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1`
drop view v1;
# This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc
# #
# This test is a bit tricky as we can't use backup table to overwrite an old # This test is a bit tricky as we can't use backup table to overwrite an old
# table # table
......
# This is a wrapper for binlog.test so that the same test case can be used # This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm] # For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
-- source include/have_binlog_format_statement.inc -- source include/have_binlog_format_statement.inc
-- source extra/binlog_tests/binlog.test -- source extra/binlog_tests/binlog.test
# This is a wrapper for binlog.test so that the same test case can be used # This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm] # For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
-- source include/have_binlog_format_statement.inc -- source include/have_binlog_format_statement.inc
-- source extra/binlog_tests/blackhole.test -- source extra/binlog_tests/blackhole.test
# This is a wrapper for binlog.test so that the same test case can be used # This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm] # For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
-- source include/have_binlog_format_statement.inc -- source include/have_binlog_format_statement.inc
-- source extra/binlog_tests/ctype_cp932.test -- source extra/binlog_tests/ctype_cp932.test
# Turn on compression between the client and server # Turn on compression between the client and server
# and run a number of tests # and run a number of tests
# Can't test with embedded server
-- source include/not_embedded.inc
-- source include/have_compress.inc -- source include/have_compress.inc
connect (comp_con,localhost,root,,,,,COMPRESS); connect (comp_con,localhost,root,,,,,COMPRESS);
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
# This test makes no sense with the embedded server # This test makes no sense with the embedded server
--source include/not_embedded.inc --source include/not_embedded.inc
# check that CSV engine was compiled in, as the test relies on the presence
# of the log tables (which are CSV-based). By connect mysql; show tables;
--source include/have_csv.inc
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2;
--enable_warnings --enable_warnings
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# should work with embedded server after mysqltest is fixed
-- source include/not_embedded.inc
source include/federated.inc; source include/federated.inc;
connection slave; connection slave;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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