[11284] Implement prepared statements for INSERT+DELETE+UPDATE SQL requests. Should improve player save performance + lower MySQL server CPU usage.

Note: PostgreSQL does not have prepared statements implemented using native APIs.

Huge thanks to Undergarun, kero99 and Vinolentus.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2011-03-25 21:52:59 +02:00
parent d9374d936f
commit 40ef9cbf2f
24 changed files with 1823 additions and 488 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="8,00"
Name="mangosd"
ProjectGUID="{A3A04E47-43A2-4C08-90B3-029CEF558594}"
RootNamespace="mangosd"

View file

@ -260,85 +260,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug_NoPCH|Win32"
OutputDirectory=".\shared__$(PlatformName)_$(ConfigurationName)"
IntermediateDirectory=".\shared__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\dep\ACE_wrappers"
PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\shared__$(PlatformName)_$(ConfigurationName)\shared.pch"
AssemblerListingLocation=".\shared__$(PlatformName)_$(ConfigurationName)\"
ObjectFile=".\shared__$(PlatformName)_$(ConfigurationName)\"
ProgramDataBaseFileName=".\shared__$(PlatformName)_$(ConfigurationName)\"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="user32.lib"
OutputFile=".\shared__$(PlatformName)_$(ConfigurationName)\shared.lib"
AdditionalLibraryDirectories="dep\lib\$(PlatformName)_debug"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory=".\shared__$(PlatformName)_$(ConfigurationName)"
@ -420,6 +341,85 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug_NoPCH|Win32"
OutputDirectory=".\shared__$(PlatformName)_$(ConfigurationName)"
IntermediateDirectory=".\shared__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\dep\ACE_wrappers"
PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\shared__$(PlatformName)_$(ConfigurationName)\shared.pch"
AssemblerListingLocation=".\shared__$(PlatformName)_$(ConfigurationName)\"
ObjectFile=".\shared__$(PlatformName)_$(ConfigurationName)\"
ProgramDataBaseFileName=".\shared__$(PlatformName)_$(ConfigurationName)\"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="user32.lib"
OutputFile=".\shared__$(PlatformName)_$(ConfigurationName)\shared.lib"
AdditionalLibraryDirectories="dep\lib\$(PlatformName)_debug"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug_NoPCH|x64"
OutputDirectory=".\shared__$(PlatformName)_$(ConfigurationName)"
@ -572,6 +572,14 @@
RelativePath="..\..\src\shared\Database\SqlOperations.h"
>
</File>
<File
RelativePath="..\..\src\shared\Database\SqlPreparedStatement.cpp"
>
</File>
<File
RelativePath="..\..\src\shared\Database\SqlPreparedStatement.h"
>
</File>
<File
RelativePath="..\..\src\shared\Database\SQLStorage.cpp"
>