mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[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:
parent
d9374d936f
commit
40ef9cbf2f
24 changed files with 1823 additions and 488 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug_NoPCH|Win32">
|
||||
<Configuration>Debug_NoPCH</Configuration>
|
||||
|
|
@ -441,6 +442,7 @@
|
|||
<ClCompile Include="..\..\src\shared\Database\QueryResultMysql.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\Database\SqlDelayThread.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\Database\SqlOperations.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\Database\SqlPreparedStatement.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\Database\SQLStorage.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\Log.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\ProgressBar.cpp" />
|
||||
|
|
@ -456,6 +458,7 @@
|
|||
<ClInclude Include="..\..\src\shared\Auth\SARC4.h" />
|
||||
<ClInclude Include="..\..\src\shared\Auth\Sha1.h" />
|
||||
<ClInclude Include="..\..\src\shared\ByteBuffer.h" />
|
||||
<ClInclude Include="..\..\src\shared\Database\SqlPreparedStatement.h" />
|
||||
<ClInclude Include="..\..\src\shared\WorldPacket.h" />
|
||||
<ClInclude Include="..\..\src\shared\Common.h" />
|
||||
<ClInclude Include="..\..\src\shared\Config\Config.h" />
|
||||
|
|
@ -501,4 +504,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -75,6 +75,9 @@
|
|||
<ClCompile Include="..\..\src\shared\Common.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\ServiceWin32.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\Threading.cpp" />
|
||||
<ClCompile Include="..\..\src\shared\Database\SqlPreparedStatement.cpp">
|
||||
<Filter>Database</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\shared\Database\Database.h">
|
||||
|
|
@ -167,6 +170,9 @@
|
|||
<ClInclude Include="..\..\src\shared\revision_sql.h" />
|
||||
<ClInclude Include="..\..\src\shared\ServiceWin32.h" />
|
||||
<ClInclude Include="..\..\src\shared\Threading.h" />
|
||||
<ClInclude Include="..\..\src\shared\Database\SqlPreparedStatement.h">
|
||||
<Filter>Database</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\src\shared\revision.h" />
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Version="9,00"
|
||||
Name="shared"
|
||||
ProjectGUID="{90297C34-F231-4DF4-848E-A74BCC0E40ED}"
|
||||
RootNamespace="shared"
|
||||
|
|
@ -575,6 +575,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"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue