mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge
This commit is contained in:
125
VC++Files/client/mysqltest.dsp
Normal file
125
VC++Files/client/mysqltest.dsp
Normal file
@ -0,0 +1,125 @@
|
||||
# Microsoft Developer Studio Project File - Name="mysqltest" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=mysqltest - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysqltest.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysqltest.mak" CFG="mysqltest - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mysqltest - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysqltest - Win32 classic" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysqltest - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mysqltest - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\debug"
|
||||
# PROP BASE Intermediate_Dir ".\debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\debug"
|
||||
# PROP Intermediate_Dir ".\debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "USE_TLS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
|
||||
# ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "USE_TLS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
|
||||
# ADD BASE MTL /nologo /tlb".\debug\mysqltest.tlb" /win32
|
||||
# ADD MTL /nologo /tlb".\debug\mysqltest.tlb" /win32
|
||||
# ADD BASE RSC /l 1033 /d "_DEBUG"
|
||||
# ADD RSC /l 1033 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib mysys.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib mysys.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqltest - Win32 classic"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\classic"
|
||||
# PROP BASE Intermediate_Dir ".\classic"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\classic"
|
||||
# PROP Intermediate_Dir ".\classic"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
|
||||
# ADD CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
|
||||
# ADD BASE MTL /nologo /tlb".\classic\mysqltest.tlb" /win32
|
||||
# ADD MTL /nologo /tlb".\classic\mysqltest.tlb" /win32
|
||||
# ADD BASE RSC /l 1033 /d "NDEBUG"
|
||||
# ADD RSC /l 1033 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqltest - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\release"
|
||||
# PROP BASE Intermediate_Dir ".\release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\release"
|
||||
# PROP Intermediate_Dir ".\release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
|
||||
# ADD CPP /nologo /MT /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
|
||||
# ADD BASE MTL /nologo /tlb".\release\mysqltest.tlb" /win32
|
||||
# ADD MTL /nologo /tlb".\release\mysqltest.tlb" /win32
|
||||
# ADD BASE RSC /l 1033 /d "NDEBUG"
|
||||
# ADD RSC /l 1033 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib odbc32.lib odbccp32.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mysqltest - Win32 Debug"
|
||||
# Name "mysqltest - Win32 classic"
|
||||
# Name "mysqltest - Win32 Release"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libmysql\manager.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mysqltest.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
106
VC++Files/mysql-test/mysql_test_run_new.dsp
Normal file
106
VC++Files/mysql-test/mysql_test_run_new.dsp
Normal file
@ -0,0 +1,106 @@
|
||||
# Microsoft Developer Studio Project File - Name="mysql_test_run_new" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=mysql_test_run_new - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysql_test_run_new.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysql_test_run_new.mak" CFG="mysql_test_run_new - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mysql_test_run_new - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "mysql_test_run_new - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mysql_test_run_new - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\debug/mysql_test_run.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
|
||||
# ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\debug/mysql_test_run.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
|
||||
# ADD BASE MTL /nologo /win32
|
||||
# ADD MTL /nologo /win32
|
||||
# ADD BASE RSC /l 1033
|
||||
# ADD RSC /l 1033
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /debug /pdb:".\debug\mysql_test_run_new.pdb" /pdbtype:sept /map /mapinfo:exports /subsystem:windows
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /debug /pdb:".\debug\mysql_test_run_new.pdb" /pdbtype:sept /map /mapinfo:exports /subsystem:windows
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysql_test_run_new - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fo".\release/" /Fd".\release/" /c /GX
|
||||
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fo".\release/" /Fd".\release/" /c /GX
|
||||
# ADD BASE MTL /nologo /win32
|
||||
# ADD MTL /nologo /win32
|
||||
# ADD BASE RSC /l 1033
|
||||
# ADD RSC /l 1033
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /pdbtype:sept /subsystem:windows
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /pdbtype:sept /subsystem:windows
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mysql_test_run_new - Win32 Debug"
|
||||
# Name "mysql_test_run_new - Win32 Release"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=my_create_tables.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=my_manage.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=my_manage.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=mysql_test_run_new.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
@ -816,6 +816,30 @@ Package=<4>
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "mysqltest"=.\client\mysqltest.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "mysql_test_run_new"=.\mysql-test\mysql_test_run_new.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
|
@ -11,8 +11,8 @@ get_lock("a",10)
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
|
||||
master-bin.000001 79 Query 1 79 use `test`; create database `drop-temp+table-test`
|
||||
master-bin.000001 152 Query 1 152 use `drop-temp+table-test`; create temporary table `table:name` (a int)
|
||||
master-bin.000001 246 Query 1 246 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
|
||||
master-bin.000001 375 Query 1 375 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
|
||||
master-bin.000001 79 Query 1 79 create database `drop-temp+table-test`
|
||||
master-bin.000001 168 Query 1 168 use `drop-temp+table-test`; create temporary table `table:name` (a int)
|
||||
master-bin.000001 262 Query 1 262 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
|
||||
master-bin.000001 391 Query 1 391 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
|
||||
drop database `drop-temp+table-test`;
|
||||
|
@ -105,62 +105,62 @@ drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
show binlog events from 79;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
master-bin.000001 79 Query 1 79 use `test`; drop database if exists mysqltest2
|
||||
master-bin.000001 148 Query 1 148 use `test`; drop database if exists mysqltest3
|
||||
master-bin.000001 217 Query 1 217 use `test`; create database mysqltest2 character set latin2
|
||||
master-bin.000001 299 Query 1 299 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
|
||||
master-bin.000001 433 Query 1 433 use `test`; create database mysqltest3
|
||||
master-bin.000001 494 Query 1 494 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
|
||||
master-bin.000001 628 Query 1 628 use `test`; drop database mysqltest3
|
||||
master-bin.000001 687 Query 1 687 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
|
||||
master-bin.000001 821 Query 1 821 use `test`; create database mysqltest3
|
||||
master-bin.000001 882 Query 1 882 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1022 Query 1 1022 use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
|
||||
master-bin.000001 1129 Query 1 1129 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1270 Intvar 1 1270 INSERT_ID=1
|
||||
master-bin.000001 1298 Query 1 1298 use `mysqltest2`; insert into t1 (b) values(@@character_set_server)
|
||||
master-bin.000001 1388 Query 1 1388 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1529 Intvar 1 1529 INSERT_ID=2
|
||||
master-bin.000001 1557 Query 1 1557 use `mysqltest2`; insert into t1 (b) values(@@collation_server)
|
||||
master-bin.000001 1643 Query 1 1643 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1784 Intvar 1 1784 INSERT_ID=3
|
||||
master-bin.000001 1812 Query 1 1812 use `mysqltest2`; insert into t1 (b) values(@@character_set_client)
|
||||
master-bin.000001 1902 Query 1 1902 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2043 Intvar 1 2043 INSERT_ID=4
|
||||
master-bin.000001 2071 Query 1 2071 use `mysqltest2`; insert into t1 (b) values(@@character_set_connection)
|
||||
master-bin.000001 2165 Query 1 2165 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2306 Intvar 1 2306 INSERT_ID=5
|
||||
master-bin.000001 2334 Query 1 2334 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
||||
master-bin.000001 2424 Query 1 2424 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2564 Query 1 2564 use `mysqltest2`; truncate table t1
|
||||
master-bin.000001 2622 Query 1 2622 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2762 Intvar 1 2762 INSERT_ID=1
|
||||
master-bin.000001 2790 Query 1 2790 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
||||
master-bin.000001 2880 Query 1 2880 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3020 Intvar 1 3020 INSERT_ID=2
|
||||
master-bin.000001 3048 Query 1 3048 use `mysqltest2`; insert into t1 (b) values(LEAST("M<>ller","Muffler"))
|
||||
master-bin.000001 3141 Query 1 3141 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3282 Intvar 1 3282 INSERT_ID=3
|
||||
master-bin.000001 3310 Query 1 3310 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
||||
master-bin.000001 3400 Query 1 3400 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3541 Intvar 1 3541 INSERT_ID=4
|
||||
master-bin.000001 3569 Query 1 3569 use `mysqltest2`; insert into t1 (b) values(LEAST("M<>ller","Muffler"))
|
||||
master-bin.000001 3662 Query 1 3662 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3803 Intvar 1 3803 INSERT_ID=74
|
||||
master-bin.000001 3831 Create_file 1 3831 db=mysqltest2;table=t1;file_id=1;block_len=581
|
||||
master-bin.000001 4504 Query 1 4504 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 4645 Intvar 1 4645 INSERT_ID=5
|
||||
master-bin.000001 4673 Exec_load 1 4673 ;file_id=1
|
||||
master-bin.000001 4696 Query 1 4696 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 4837 Query 1 4837 use `mysqltest2`; truncate table t1
|
||||
master-bin.000001 4895 Query 1 4895 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 5036 Intvar 1 5036 INSERT_ID=1
|
||||
master-bin.000001 5064 User var 1 5064 @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
|
||||
master-bin.000001 5104 Query 1 5104 use `mysqltest2`; insert into t1 (b) values(collation(@a))
|
||||
master-bin.000001 5185 Query 1 5185 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 5326 Query 1 5326 use `mysqltest2`; drop database mysqltest2
|
||||
master-bin.000001 5391 Query 1 5391 SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 5522 Query 1 5522 drop database mysqltest3
|
||||
master-bin.000001 79 Query 1 79 drop database if exists mysqltest2
|
||||
master-bin.000001 154 Query 1 154 drop database if exists mysqltest3
|
||||
master-bin.000001 229 Query 1 229 create database mysqltest2 character set latin2
|
||||
master-bin.000001 317 Query 1 317 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
|
||||
master-bin.000001 451 Query 1 451 create database mysqltest3
|
||||
master-bin.000001 518 Query 1 518 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
|
||||
master-bin.000001 652 Query 1 652 drop database mysqltest3
|
||||
master-bin.000001 717 Query 1 717 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
|
||||
master-bin.000001 851 Query 1 851 create database mysqltest3
|
||||
master-bin.000001 918 Query 1 918 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1058 Query 1 1058 use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
|
||||
master-bin.000001 1165 Query 1 1165 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1306 Intvar 1 1306 INSERT_ID=1
|
||||
master-bin.000001 1334 Query 1 1334 use `mysqltest2`; insert into t1 (b) values(@@character_set_server)
|
||||
master-bin.000001 1424 Query 1 1424 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1565 Intvar 1 1565 INSERT_ID=2
|
||||
master-bin.000001 1593 Query 1 1593 use `mysqltest2`; insert into t1 (b) values(@@collation_server)
|
||||
master-bin.000001 1679 Query 1 1679 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 1820 Intvar 1 1820 INSERT_ID=3
|
||||
master-bin.000001 1848 Query 1 1848 use `mysqltest2`; insert into t1 (b) values(@@character_set_client)
|
||||
master-bin.000001 1938 Query 1 1938 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2079 Intvar 1 2079 INSERT_ID=4
|
||||
master-bin.000001 2107 Query 1 2107 use `mysqltest2`; insert into t1 (b) values(@@character_set_connection)
|
||||
master-bin.000001 2201 Query 1 2201 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2342 Intvar 1 2342 INSERT_ID=5
|
||||
master-bin.000001 2370 Query 1 2370 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
||||
master-bin.000001 2460 Query 1 2460 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2600 Query 1 2600 use `mysqltest2`; truncate table t1
|
||||
master-bin.000001 2658 Query 1 2658 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 2798 Intvar 1 2798 INSERT_ID=1
|
||||
master-bin.000001 2826 Query 1 2826 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
||||
master-bin.000001 2916 Query 1 2916 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3056 Intvar 1 3056 INSERT_ID=2
|
||||
master-bin.000001 3084 Query 1 3084 use `mysqltest2`; insert into t1 (b) values(LEAST("M<>ller","Muffler"))
|
||||
master-bin.000001 3177 Query 1 3177 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3318 Intvar 1 3318 INSERT_ID=3
|
||||
master-bin.000001 3346 Query 1 3346 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
|
||||
master-bin.000001 3436 Query 1 3436 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3577 Intvar 1 3577 INSERT_ID=4
|
||||
master-bin.000001 3605 Query 1 3605 use `mysqltest2`; insert into t1 (b) values(LEAST("M<>ller","Muffler"))
|
||||
master-bin.000001 3698 Query 1 3698 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 3839 Intvar 1 3839 INSERT_ID=74
|
||||
master-bin.000001 3867 Create_file 1 3867 db=mysqltest2;table=t1;file_id=1;block_len=581
|
||||
master-bin.000001 4540 Query 1 4540 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 4681 Intvar 1 4681 INSERT_ID=5
|
||||
master-bin.000001 4709 Exec_load 1 4709 ;file_id=1
|
||||
master-bin.000001 4732 Query 1 4732 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 4873 Query 1 4873 use `mysqltest2`; truncate table t1
|
||||
master-bin.000001 4931 Query 1 4931 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 5072 Intvar 1 5072 INSERT_ID=1
|
||||
master-bin.000001 5100 User var 1 5100 @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
|
||||
master-bin.000001 5140 Query 1 5140 use `mysqltest2`; insert into t1 (b) values(collation(@a))
|
||||
master-bin.000001 5221 Query 1 5221 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 5362 Query 1 5362 drop database mysqltest2
|
||||
master-bin.000001 5427 Query 1 5427 SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
|
||||
master-bin.000001 5558 Query 1 5558 drop database mysqltest3
|
||||
set global character_set_server=latin2;
|
||||
ERROR HY000: Binary logging and replication forbid changing the global server character set or collation
|
||||
set global character_set_server=latin2;
|
||||
@ -200,8 +200,8 @@ hex(c1) hex(c2)
|
||||
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
|
||||
stop slave;
|
||||
delete from t1;
|
||||
change master to master_log_pos=5801;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=5937;
|
||||
change master to master_log_pos=5847;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=5983;
|
||||
start slave;
|
||||
select hex(c1), hex(c2) from t1;
|
||||
hex(c1) hex(c2)
|
||||
|
83
mysql-test/r/rpl_create_database.result
Normal file
83
mysql-test/r/rpl_create_database.result
Normal file
@ -0,0 +1,83 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
CREATE DATABASE mysqltest_prometheus;
|
||||
CREATE DATABASE mysqltest_sisyfos;
|
||||
CREATE DATABASE mysqltest_bob;
|
||||
USE mysqltest_sisyfos;
|
||||
CREATE TABLE t1 (b int);
|
||||
INSERT INTO t1 VALUES(1);
|
||||
USE mysqltest_bob;
|
||||
CREATE TABLE t2 (b int);
|
||||
INSERT INTO t2 VALUES(2);
|
||||
ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1;
|
||||
USE mysqltest_sisyfos;
|
||||
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
mysql
|
||||
mysqltest_bob
|
||||
mysqltest_prometheus
|
||||
mysqltest_sisyfos
|
||||
test
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
mysql
|
||||
mysqltest_prometheus
|
||||
mysqltest_sisyfos
|
||||
test
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
USE mysqltest_prometheus;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE DATABASE mysqltest_sisyfos;
|
||||
USE mysqltest_sisyfos;
|
||||
CREATE TABLE t2 (a INT);
|
||||
SHOW BINLOG EVENTS;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
master-bin.000001 4 Start 1 4 Server ver: 4.1.8-debug-log, Binlog ver: 3
|
||||
master-bin.000001 79 Query 1 79 DROP DATABASE IF EXISTS mysqltest_prometheus
|
||||
master-bin.000001 174 Query 1 174 DROP DATABASE IF EXISTS mysqltest_sisyfos
|
||||
master-bin.000001 263 Query 1 263 CREATE DATABASE mysqltest_prometheus
|
||||
master-bin.000001 350 Query 1 350 CREATE DATABASE mysqltest_sisyfos
|
||||
master-bin.000001 431 Query 1 431 use `mysqltest_sisyfos`; CREATE TABLE t1 (b int)
|
||||
master-bin.000001 502 Query 1 502 use `mysqltest_sisyfos`; INSERT INTO t1 VALUES(1)
|
||||
master-bin.000001 574 Query 1 574 ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1
|
||||
master-bin.000001 675 Query 1 675 DROP DATABASE IF EXISTS mysqltest_sisyfos
|
||||
master-bin.000001 764 Query 1 764 use `mysqltest_prometheus`; CREATE TABLE t1 (a INT)
|
||||
master-bin.000001 838 Query 1 838 use `mysqltest_prometheus`; INSERT INTO t1 VALUES (1)
|
||||
master-bin.000001 914 Query 1 914 CREATE DATABASE mysqltest_sisyfos
|
||||
master-bin.000001 995 Query 1 995 use `mysqltest_sisyfos`; CREATE TABLE t2 (a INT)
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
mysql
|
||||
mysqltest_bob
|
||||
mysqltest_prometheus
|
||||
mysqltest_sisyfos
|
||||
test
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
mysql
|
||||
mysqltest_prometheus
|
||||
mysqltest_sisyfos
|
||||
test
|
||||
SHOW CREATE TABLE mysqltest_prometheus.t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW CREATE TABLE mysqltest_sisyfos.t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
@ -12,4 +12,6 @@ use mysqltest;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||
show binlog events from 79;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
master-bin.000001 79 Query 1 79 drop database if exists mysqltest
|
||||
master-bin.000001 152 Query 1 152 create database mysqltest
|
||||
drop database mysqltest;
|
||||
|
@ -154,9 +154,9 @@ select hex(c1), hex(c2) from t1;
|
||||
|
||||
stop slave;
|
||||
delete from t1;
|
||||
change master to master_log_pos=5801;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=5937;
|
||||
# Slave is supposed to stop _after_ the INSERT, even though 5937 is
|
||||
change master to master_log_pos=5847;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=5983;
|
||||
# Slave is supposed to stop _after_ the INSERT, even though 5983 is
|
||||
# the position of the beginning of the INSERT; after SET slave is not
|
||||
# supposed to increment position.
|
||||
wait_for_slave_to_stop;
|
||||
|
1
mysql-test/t/rpl_create_database-master.opt
Normal file
1
mysql-test/t/rpl_create_database-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--binlog-do-db=mysqltest_sisyfos --binlog-do-db=mysqltest_prometheus
|
1
mysql-test/t/rpl_create_database-slave.opt
Normal file
1
mysql-test/t/rpl_create_database-slave.opt
Normal file
@ -0,0 +1 @@
|
||||
--replicate-do-db=mysqltest_sisyfos --replicate-do-db=mysqltest_prometheus
|
68
mysql-test/t/rpl_create_database.test
Normal file
68
mysql-test/t/rpl_create_database.test
Normal file
@ -0,0 +1,68 @@
|
||||
#
|
||||
# Tests for replication of statements that manipulate databases.
|
||||
#
|
||||
# For this test file, we have a number of databases. All databases
|
||||
# with "greek" names will be replicated on the slave, while other names
|
||||
# (e.g., american) will not be replicated.
|
||||
#
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
# Bug#6391 (binlog-do-db rules ignored)
|
||||
# In this case, 'mysqltest_bob' should not be replicated to the slave.
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
sync_slave_with_master;
|
||||
# This database is not replicated
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
--enable_warnings
|
||||
|
||||
connection master;
|
||||
CREATE DATABASE mysqltest_prometheus;
|
||||
CREATE DATABASE mysqltest_sisyfos;
|
||||
CREATE DATABASE mysqltest_bob;
|
||||
|
||||
USE mysqltest_sisyfos;
|
||||
# These should be replicated
|
||||
CREATE TABLE t1 (b int);
|
||||
INSERT INTO t1 VALUES(1);
|
||||
|
||||
USE mysqltest_bob;
|
||||
# These should *not* be replicated
|
||||
CREATE TABLE t2 (b int);
|
||||
INSERT INTO t2 VALUES(2);
|
||||
|
||||
# Current database is now 'mysqltest_bob'
|
||||
# The following should be replicated
|
||||
ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1;
|
||||
|
||||
USE mysqltest_sisyfos;
|
||||
# The following should *not* be replicated
|
||||
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
|
||||
|
||||
SHOW DATABASES;
|
||||
sync_slave_with_master;
|
||||
SHOW DATABASES;
|
||||
|
||||
connection master;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
USE mysqltest_prometheus;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE DATABASE mysqltest_sisyfos;
|
||||
USE mysqltest_sisyfos;
|
||||
CREATE TABLE t2 (a INT);
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW DATABASES;
|
||||
sync_slave_with_master;
|
||||
SHOW DATABASES;
|
||||
SHOW CREATE TABLE mysqltest_prometheus.t1;
|
||||
SHOW CREATE TABLE mysqltest_sisyfos.t2;
|
||||
|
||||
connection master;
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
sync_slave_with_master;
|
@ -43,7 +43,7 @@ show slave status;
|
||||
|
||||
# try replicate all until second insert to t2;
|
||||
start slave until relay_log_file='slave-relay-bin.000002', relay_log_pos=537;
|
||||
sleep 2;
|
||||
sleep 4;
|
||||
select * from t2;
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 9 # 23 # 33 #
|
||||
|
@ -7320,6 +7320,8 @@ void Dblqh::closeScanRequestLab(Signal* signal)
|
||||
scanptr.p->m_curr_batch_size_rows = 0;
|
||||
scanptr.p->m_curr_batch_size_bytes= 0;
|
||||
sendScanFragConf(signal, ZTRUE);
|
||||
abort_scan(signal, scanptr.i, 0);
|
||||
return;
|
||||
break;
|
||||
case TcConnectionrec::SCAN_TUPKEY:
|
||||
case TcConnectionrec::SCAN_FIRST_STOPPED:
|
||||
@ -7711,6 +7713,9 @@ void Dblqh::abort_scan(Signal* signal, Uint32 scan_ptr_i, Uint32 errcode){
|
||||
tcConnectptr.p->transactionState = TcConnectionrec::IDLE;
|
||||
tcConnectptr.p->abortState = TcConnectionrec::ABORT_ACTIVE;
|
||||
|
||||
if(errcode)
|
||||
{
|
||||
jam();
|
||||
ScanFragRef * ref = (ScanFragRef*)&signal->theData[0];
|
||||
ref->senderData = tcConnectptr.p->clientConnectrec;
|
||||
ref->transId1 = tcConnectptr.p->transid[0];
|
||||
@ -7718,6 +7723,7 @@ void Dblqh::abort_scan(Signal* signal, Uint32 scan_ptr_i, Uint32 errcode){
|
||||
ref->errorCode = errcode;
|
||||
sendSignal(tcConnectptr.p->clientBlockref, GSN_SCAN_FRAGREF, signal,
|
||||
ScanFragRef::SignalLength, JBB);
|
||||
}
|
||||
deleteTransidHash(signal);
|
||||
releaseOprec(signal);
|
||||
releaseTcrec(signal, tcConnectptr);
|
||||
|
@ -1113,6 +1113,7 @@ Dbtup::updateStartLab(Signal* signal,
|
||||
regOperPtr->attrinbufLen);
|
||||
if (retValue == -1) {
|
||||
tupkeyErrorLab(signal);
|
||||
return -1;
|
||||
}//if
|
||||
} else {
|
||||
jam();
|
||||
|
@ -519,6 +519,7 @@ void NDBT_TestCaseImpl1::waitSteps(){
|
||||
NdbThread_WaitFor(threads[i], &status);
|
||||
NdbThread_Destroy(&threads[i]);
|
||||
}
|
||||
threads.clear();
|
||||
}
|
||||
|
||||
|
||||
|
@ -723,7 +723,7 @@ int ha_rollback_to_savepoint(THD *thd, char *savepoint_name)
|
||||
if (unlikely((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) &&
|
||||
my_b_tell(&thd->transaction.trans_log)))
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo))
|
||||
error= 1;
|
||||
}
|
||||
@ -761,7 +761,7 @@ int ha_savepoint(THD *thd, char *savepoint_name)
|
||||
innobase_savepoint(thd,savepoint_name,
|
||||
my_b_tell(&thd->transaction.trans_log));
|
||||
#endif
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo))
|
||||
error= 1;
|
||||
}
|
||||
|
@ -2010,7 +2010,7 @@ void item_user_lock_release(User_level_lock *ull)
|
||||
tmp.copy(command, strlen(command), tmp.charset());
|
||||
tmp.append(ull->key,ull->key_length);
|
||||
tmp.append("\")", 2);
|
||||
Query_log_event qev(current_thd, tmp.ptr(), tmp.length(),1);
|
||||
Query_log_event qev(current_thd, tmp.ptr(), tmp.length(),1, FALSE);
|
||||
qev.error_code=0; // this query is always safe to run on slave
|
||||
mysql_bin_log.write(&qev);
|
||||
}
|
||||
|
14
sql/log.cc
14
sql/log.cc
@ -1274,7 +1274,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
|
||||
(local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db)))
|
||||
{
|
||||
VOID(pthread_mutex_unlock(&LOCK_log));
|
||||
DBUG_PRINT("error",("!db_ok"));
|
||||
DBUG_PRINT("error",("!db_ok('%s')", local_db));
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
#endif /* HAVE_REPLICATION */
|
||||
@ -1317,7 +1317,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
|
||||
(uint) thd->variables.collation_connection->number,
|
||||
(uint) thd->variables.collation_database->number,
|
||||
(uint) thd->variables.collation_server->number);
|
||||
Query_log_event e(thd, buf, written, 0);
|
||||
Query_log_event e(thd, buf, written, 0, FALSE);
|
||||
e.set_log_pos(this);
|
||||
if (e.write(file))
|
||||
goto err;
|
||||
@ -1333,7 +1333,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
|
||||
char *buf_end= strxmov(buf, "SET ONE_SHOT TIME_ZONE='",
|
||||
thd->variables.time_zone->get_name()->ptr(),
|
||||
"'", NullS);
|
||||
Query_log_event e(thd, buf, buf_end - buf, 0);
|
||||
Query_log_event e(thd, buf, buf_end - buf, 0, FALSE);
|
||||
e.set_log_pos(this);
|
||||
if (e.write(file))
|
||||
goto err;
|
||||
@ -1402,7 +1402,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
|
||||
|
||||
if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS)
|
||||
{
|
||||
Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=0", 24, 0);
|
||||
Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=0", 24, 0, FALSE);
|
||||
e.set_log_pos(this);
|
||||
if (e.write(file))
|
||||
goto err;
|
||||
@ -1421,7 +1421,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
|
||||
{
|
||||
if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS)
|
||||
{
|
||||
Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0);
|
||||
Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0, FALSE);
|
||||
e.set_log_pos(this);
|
||||
if (e.write(file))
|
||||
goto err;
|
||||
@ -1597,7 +1597,7 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, bool commit_or_rollback)
|
||||
we will add the "COMMIT mark and write the buffer to the binlog.
|
||||
*/
|
||||
{
|
||||
Query_log_event qinfo(thd, "BEGIN", 5, TRUE);
|
||||
Query_log_event qinfo(thd, "BEGIN", 5, TRUE, FALSE);
|
||||
/*
|
||||
Imagine this is rollback due to net timeout, after all statements of
|
||||
the transaction succeeded. Then we want a zero-error code in BEGIN.
|
||||
@ -1638,7 +1638,7 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, bool commit_or_rollback)
|
||||
Query_log_event qinfo(thd,
|
||||
commit_or_rollback ? "COMMIT" : "ROLLBACK",
|
||||
commit_or_rollback ? 6 : 8,
|
||||
TRUE);
|
||||
TRUE, FALSE);
|
||||
qinfo.error_code= 0;
|
||||
qinfo.set_log_pos(this);
|
||||
if (qinfo.write(&log_file) || flush_io_cache(&log_file) ||
|
||||
|
@ -780,7 +780,8 @@ void Query_log_event::pack_info(Protocol *protocol)
|
||||
if (!(buf= my_malloc(9 + db_len + q_len, MYF(MY_WME))))
|
||||
return;
|
||||
pos= buf;
|
||||
if (db && db_len)
|
||||
if (!(flags & LOG_EVENT_SUPPRESS_USE_F)
|
||||
&& db && db_len)
|
||||
{
|
||||
pos= strmov(buf, "use `");
|
||||
memcpy(pos, db, db_len);
|
||||
@ -872,9 +873,12 @@ int Query_log_event::write_data(IO_CACHE* file)
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
|
||||
ulong query_length, bool using_trans)
|
||||
:Log_event(thd_arg, !thd_arg->tmp_table_used ?
|
||||
0 : LOG_EVENT_THREAD_SPECIFIC_F, using_trans),
|
||||
ulong query_length, bool using_trans,
|
||||
bool suppress_use)
|
||||
:Log_event(thd_arg,
|
||||
((thd_arg->tmp_table_used ? LOG_EVENT_THREAD_SPECIFIC_F : 0)
|
||||
| (suppress_use ? LOG_EVENT_SUPPRESS_USE_F : 0)),
|
||||
using_trans),
|
||||
data_buf(0), query(query_arg),
|
||||
db(thd_arg->db), q_len((uint32) query_length),
|
||||
error_code(thd_arg->killed ?
|
||||
@ -949,6 +953,8 @@ void Query_log_event::print(FILE* file, bool short_form, char* last_db)
|
||||
|
||||
bool different_db= 1;
|
||||
|
||||
if (!(flags & LOG_EVENT_SUPPRESS_USE_F))
|
||||
{
|
||||
if (db && last_db)
|
||||
{
|
||||
if (different_db= memcmp(last_db, db, db_len + 1))
|
||||
@ -956,7 +962,11 @@ void Query_log_event::print(FILE* file, bool short_form, char* last_db)
|
||||
}
|
||||
|
||||
if (db && db[0] && different_db)
|
||||
{
|
||||
fprintf(file, "use %s;\n", db);
|
||||
}
|
||||
}
|
||||
|
||||
end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10);
|
||||
*end++=';';
|
||||
*end++='\n';
|
||||
|
@ -264,6 +264,19 @@ struct sql_ex_info
|
||||
*/
|
||||
#define LOG_EVENT_THREAD_SPECIFIC_F 0x4
|
||||
|
||||
/*
|
||||
Suppress the generation of 'USE' statements before the actual
|
||||
statement. This flag should be set for any events that does not need
|
||||
the current database set to function correctly. Most notable cases
|
||||
are 'CREATE DATABASE' and 'DROP DATABASE'.
|
||||
|
||||
This flags should only be used in exceptional circumstances, since
|
||||
it introduce a significant change in behaviour regarding the
|
||||
replication logic together with the flags --binlog-do-db and
|
||||
--replicated-do-db.
|
||||
*/
|
||||
#define LOG_EVENT_SUPPRESS_USE_F 0x8
|
||||
|
||||
enum Log_event_type
|
||||
{
|
||||
UNKNOWN_EVENT= 0, START_EVENT= 1, QUERY_EVENT= 2, STOP_EVENT= 3,
|
||||
@ -331,8 +344,9 @@ public:
|
||||
|
||||
/*
|
||||
Some 16 flags. Only one is really used now; look above for
|
||||
LOG_EVENT_TIME_F, LOG_EVENT_FORCED_ROTATE_F, LOG_EVENT_THREAD_SPECIFIC_F
|
||||
for notes.
|
||||
LOG_EVENT_TIME_F, LOG_EVENT_FORCED_ROTATE_F,
|
||||
LOG_EVENT_THREAD_SPECIFIC_F, and LOG_EVENT_SUPPRESS_USE_F for
|
||||
notes.
|
||||
*/
|
||||
uint16 flags;
|
||||
|
||||
@ -465,7 +479,7 @@ public:
|
||||
#ifndef MYSQL_CLIENT
|
||||
|
||||
Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
|
||||
bool using_trans);
|
||||
bool using_trans, bool suppress_use);
|
||||
const char* get_db() { return db; }
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
|
@ -1230,7 +1230,7 @@ bool change_password(THD *thd, const char *host, const char *user,
|
||||
new_password));
|
||||
thd->clear_error();
|
||||
mysql_update_log.write(thd, buff, query_length);
|
||||
Query_log_event qinfo(thd, buff, query_length, 0);
|
||||
Query_log_event qinfo(thd, buff, query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
@ -524,7 +524,7 @@ void close_temporary_tables(THD *thd)
|
||||
{
|
||||
/* The -1 is to remove last ',' */
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, query, (ulong)(end-query)-1, 0);
|
||||
Query_log_event qinfo(thd, query, (ulong)(end-query)-1, 0, FALSE);
|
||||
/*
|
||||
Imagine the thread had created a temp table, then was doing a SELECT, and
|
||||
the SELECT was killed. Then it's not clever to mark the statement above as
|
||||
@ -1441,7 +1441,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
|
||||
{
|
||||
end = strxmov(strmov(query, "DELETE FROM `"),
|
||||
db,"`.`",name,"`", NullS);
|
||||
Query_log_event qinfo(thd, query, (ulong)(end-query), 0);
|
||||
Query_log_event qinfo(thd, query, (ulong)(end-query), 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
my_free(query, MYF(0));
|
||||
}
|
||||
|
@ -1241,6 +1241,7 @@ class select_insert :public select_result_interceptor {
|
||||
~select_insert();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
bool send_data(List<Item> &items);
|
||||
virtual void store_values(List<Item> &values);
|
||||
void send_error(uint errcode,const char *err);
|
||||
bool send_eof();
|
||||
/* not implemented: select_insert is never re-used in prepared statements */
|
||||
@ -1268,7 +1269,7 @@ public:
|
||||
create_info(create_info_par), lock(0)
|
||||
{}
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
bool send_data(List<Item> &values);
|
||||
void store_values(List<Item> &values);
|
||||
void send_error(uint errcode,const char *err);
|
||||
bool send_eof();
|
||||
void abort();
|
||||
|
@ -467,7 +467,29 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
|
||||
mysql_update_log.write(thd, query, query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, query, query_length, 0);
|
||||
Query_log_event qinfo(thd, query, query_length, 0,
|
||||
/* suppress_use */ TRUE);
|
||||
|
||||
/*
|
||||
Write should use the database being created as the "current
|
||||
database" and not the threads current database, which is the
|
||||
default. If we do not change the "current database" to the
|
||||
database being created, the CREATE statement will not be
|
||||
replicated when using --binlog-do-db to select databases to be
|
||||
replicated.
|
||||
|
||||
An example (--binlog-do-db=sisyfos):
|
||||
|
||||
CREATE DATABASE bob; # Not replicated
|
||||
USE bob; # 'bob' is the current database
|
||||
CREATE DATABASE sisyfos; # Not replicated since 'bob' is
|
||||
# current database.
|
||||
USE sisyfos; # Will give error on slave since
|
||||
# database does not exist.
|
||||
*/
|
||||
qinfo.db = db;
|
||||
qinfo.db_len = strlen(db);
|
||||
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
send_ok(thd, result);
|
||||
@ -517,7 +539,15 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
|
||||
mysql_update_log.write(thd,thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0,
|
||||
/* suppress_use */ TRUE);
|
||||
|
||||
// Write should use the database being created as the "current
|
||||
// database" and not the threads current database, which is the
|
||||
// default.
|
||||
qinfo.db = db;
|
||||
qinfo.db_len = strlen(db);
|
||||
|
||||
thd->clear_error();
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
@ -625,7 +655,15 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
|
||||
mysql_update_log.write(thd, query, query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, query, query_length, 0);
|
||||
Query_log_event qinfo(thd, query, query_length, 0,
|
||||
/* suppress_use */ TRUE);
|
||||
|
||||
// Write should use the database being created as the "current
|
||||
// database" and not the threads current database, which is the
|
||||
// default.
|
||||
qinfo.db = db;
|
||||
qinfo.db_len = strlen(db);
|
||||
|
||||
thd->clear_error();
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ cleanup:
|
||||
if (error <= 0)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
log_delayed);
|
||||
log_delayed, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo) && transactional_table)
|
||||
error=1;
|
||||
}
|
||||
@ -565,7 +565,7 @@ bool multi_delete::send_eof()
|
||||
if (error <= 0)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
log_delayed);
|
||||
log_delayed, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo) && !normal_tables)
|
||||
local_error=1; // Log write failed: roll back the SQL statement
|
||||
}
|
||||
@ -674,7 +674,7 @@ end:
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
thd->tmp_table);
|
||||
thd->tmp_table, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
send_ok(thd); // This should return record count
|
||||
|
@ -368,7 +368,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
if (error <= 0)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
log_delayed);
|
||||
log_delayed, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo) && transactional_table)
|
||||
error=1;
|
||||
}
|
||||
@ -1364,7 +1364,7 @@ bool delayed_insert::handle_inserts(void)
|
||||
mysql_update_log.write(&thd,row->query, row->query_length);
|
||||
if (row->log_query & DELAYED_LOG_BIN && using_bin_log)
|
||||
{
|
||||
Query_log_event qinfo(&thd, row->query, row->query_length,0);
|
||||
Query_log_event qinfo(&thd, row->query, row->query_length,0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -1457,7 +1457,6 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
|
||||
restore_record(table,default_values); // Get empty record
|
||||
table->next_number_field=table->found_next_number_field;
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // calc cuted fields
|
||||
thd->cuted_fields=0;
|
||||
if (info.handle_duplicates == DUP_IGNORE ||
|
||||
info.handle_duplicates == DUP_REPLACE)
|
||||
@ -1487,27 +1486,34 @@ select_insert::~select_insert()
|
||||
bool select_insert::send_data(List<Item> &values)
|
||||
{
|
||||
DBUG_ENTER("select_insert::send_data");
|
||||
bool error=0;
|
||||
if (unit->offset_limit_cnt)
|
||||
{ // using limit offset,count
|
||||
unit->offset_limit_cnt--;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
if (fields->elements)
|
||||
fill_record(*fields, values, 1);
|
||||
else
|
||||
fill_record(table->field, values, 1);
|
||||
if (thd->net.report_error || write_record(table,&info))
|
||||
DBUG_RETURN(1);
|
||||
if (table->next_number_field) // Clear for next record
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // calc cuted fields
|
||||
store_values(values);
|
||||
error=thd->net.report_error || write_record(table,&info);
|
||||
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
|
||||
if (!error && table->next_number_field) // Clear for next record
|
||||
{
|
||||
table->next_number_field->reset();
|
||||
if (! last_insert_id && thd->insert_id_used)
|
||||
last_insert_id=thd->insert_id();
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
void select_insert::store_values(List<Item> &values)
|
||||
{
|
||||
if (fields->elements)
|
||||
fill_record(*fields, values, 1);
|
||||
else
|
||||
fill_record(table->field, values, 1);
|
||||
}
|
||||
|
||||
void select_insert::send_error(uint errcode,const char *err)
|
||||
{
|
||||
DBUG_ENTER("select_insert::send_error");
|
||||
@ -1539,7 +1545,7 @@ void select_insert::send_error(uint errcode,const char *err)
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
table->file->has_transactions());
|
||||
table->file->has_transactions(), FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
if (!table->tmp_table)
|
||||
@ -1581,7 +1587,7 @@ bool select_insert::send_eof()
|
||||
if (!error)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
table->file->has_transactions());
|
||||
table->file->has_transactions(), FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
if ((error2=ha_autocommit_or_rollback(thd,error)) && ! error)
|
||||
@ -1637,7 +1643,6 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
table->next_number_field=table->found_next_number_field;
|
||||
|
||||
restore_record(table,default_values); // Get empty record
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // count warnings
|
||||
thd->cuted_fields=0;
|
||||
if (info.handle_duplicates == DUP_IGNORE ||
|
||||
info.handle_duplicates == DUP_REPLACE)
|
||||
@ -1647,23 +1652,9 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
}
|
||||
|
||||
|
||||
bool select_create::send_data(List<Item> &values)
|
||||
void select_create::store_values(List<Item> &values)
|
||||
{
|
||||
if (unit->offset_limit_cnt)
|
||||
{ // using limit offset,count
|
||||
unit->offset_limit_cnt--;
|
||||
return 0;
|
||||
}
|
||||
fill_record(field, values, 1);
|
||||
if (thd->net.report_error ||write_record(table,&info))
|
||||
return 1;
|
||||
if (table->next_number_field) // Clear for next record
|
||||
{
|
||||
table->next_number_field->reset();
|
||||
if (! last_insert_id && thd->insert_id_used)
|
||||
last_insert_id=thd->insert_id();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2614,7 +2614,7 @@ unsent_create_error:
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error(); // No binlog error generated
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -2643,7 +2643,7 @@ unsent_create_error:
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error(); // No binlog error generated
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -2666,7 +2666,7 @@ unsent_create_error:
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error(); // No binlog error generated
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -3262,7 +3262,7 @@ purposes internal to the MySQL server", MYF(0));
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
send_ok(thd);
|
||||
@ -3278,7 +3278,7 @@ purposes internal to the MySQL server", MYF(0));
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
send_ok(thd);
|
||||
@ -3345,7 +3345,7 @@ purposes internal to the MySQL server", MYF(0));
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -3366,7 +3366,7 @@ purposes internal to the MySQL server", MYF(0));
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
if (mqh_used && lex->sql_command == SQLCOM_GRANT)
|
||||
@ -3409,7 +3409,7 @@ purposes internal to the MySQL server", MYF(0));
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
send_ok(thd);
|
||||
|
@ -276,7 +276,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
if (!error)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
tmp_table_deleted && !some_tables_deleted);
|
||||
tmp_table_deleted && !some_tables_deleted,
|
||||
FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -1413,7 +1414,8 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
test(create_info->options &
|
||||
HA_LEX_CREATE_TMP_TABLE));
|
||||
HA_LEX_CREATE_TMP_TABLE),
|
||||
FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
@ -2338,7 +2340,8 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
test(create_info->options &
|
||||
HA_LEX_CREATE_TMP_TABLE));
|
||||
HA_LEX_CREATE_TMP_TABLE),
|
||||
FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
res= 0;
|
||||
@ -2449,7 +2452,7 @@ mysql_discard_or_import_tablespace(THD *thd,
|
||||
mysql_update_log.write(thd, thd->query,thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
err:
|
||||
@ -2836,7 +2839,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
if (do_send_ok)
|
||||
@ -3231,7 +3234,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
goto end_temporary;
|
||||
@ -3366,7 +3369,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
VOID(pthread_cond_broadcast(&COND_refresh));
|
||||
|
@ -344,7 +344,7 @@ int mysql_update(THD *thd,
|
||||
if (error <= 0)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
log_delayed);
|
||||
log_delayed, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo) && transactional_table)
|
||||
error=1; // Rollback update
|
||||
}
|
||||
@ -1221,7 +1221,7 @@ bool multi_update::send_eof()
|
||||
if (local_error <= 0)
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length,
|
||||
log_delayed);
|
||||
log_delayed, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo) && trans_safe)
|
||||
local_error= 1; // Rollback update
|
||||
}
|
||||
|
Reference in New Issue
Block a user