mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge mysql-5.5-bugteam -> mysql-5.5-innodb
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
*.d
|
*.d
|
||||||
*.da
|
*.da
|
||||||
*.dll
|
*.dll
|
||||||
|
*.dylib
|
||||||
*.exe
|
*.exe
|
||||||
*.exp
|
*.exp
|
||||||
*.gcda
|
*.gcda
|
||||||
@@ -611,6 +612,7 @@ include/mysql_version.h
|
|||||||
include/mysqld_ername.h
|
include/mysqld_ername.h
|
||||||
include/mysqld_error.h
|
include/mysqld_error.h
|
||||||
include/openssl
|
include/openssl
|
||||||
|
include/probes_mysql_dtrace.h
|
||||||
include/readline
|
include/readline
|
||||||
include/readline/*.h
|
include/readline/*.h
|
||||||
include/readline/readline.h
|
include/readline/readline.h
|
||||||
@@ -3113,3 +3115,4 @@ libmysqld/mysqlserver_depends.c
|
|||||||
libmysqld/examples/mysql_embedded
|
libmysqld/examples/mysql_embedded
|
||||||
sql/.empty
|
sql/.empty
|
||||||
mysys/thr_lock
|
mysys/thr_lock
|
||||||
|
VERSION.dep
|
||||||
|
@@ -115,30 +115,24 @@ ENDIF()
|
|||||||
# Control aspects of the development environment which are
|
# Control aspects of the development environment which are
|
||||||
# specific to MySQL maintainers and developers.
|
# specific to MySQL maintainers and developers.
|
||||||
#
|
#
|
||||||
INCLUDE (CheckCCompilerFlag)
|
INCLUDE(maintainer)
|
||||||
OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment" OFF)
|
|
||||||
# Whether the maintainer mode should be enabled.
|
OPTION(MYSQL_MAINTAINER_MODE
|
||||||
|
"MySQL maintainer-specific development environment" OFF)
|
||||||
|
|
||||||
|
# Whether the maintainer mode compiler options should be enabled.
|
||||||
IF(MYSQL_MAINTAINER_MODE)
|
IF(MYSQL_MAINTAINER_MODE)
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||||
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" HAVE_DECLARATION_AFTER_STATEMENT)
|
SET_MYSQL_MAINTAINER_GNU_C_OPTIONS()
|
||||||
IF(HAVE_DECLARATION_AFTER_STATEMENT)
|
|
||||||
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT "-Wdeclaration-after-statement")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
SET(MY_MAINTAINER_C_WARNINGS
|
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
|
SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||||
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_C_WARNINGS} -Wno-unused-parameter"
|
SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS()
|
||||||
CACHE STRING "C++ warning options used in maintainer builds.")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||||
SET(MY_MAINTAINER_C_WARNINGS
|
SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS()
|
||||||
"${MY_MAINTAINER_C_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
|
|
||||||
CACHE STRING "C warning options used in maintainer builds.")
|
|
||||||
ENDIF()
|
|
||||||
# Do not make warnings in checks into errors.
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
444
README
444
README
@@ -68,7 +68,6 @@ Use of any of this software is governed by the terms of the license below:
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
==
|
|
||||||
# (To distributed this file outside of CMake, substitute the full
|
# (To distributed this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
#
|
#
|
||||||
@@ -122,27 +121,30 @@ CMake is distributed under BSD License
|
|||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
* Redistributions of source code must retain the above copyright
|
||||||
this list of conditions and the following disclaimer.
|
notice, this list of conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
notice, this list of conditions and the following disclaimer in the
|
notice, this list of conditions and the following disclaimer in
|
||||||
documentation and/or other materials provided with the distribution.
|
the documentation and/or other materials provided with the
|
||||||
* Neither the name of Kitware, Inc. nor the names of its contributors
|
distribution.
|
||||||
may be used to endorse or promote products derived from this software without
|
* Neither the name of Kitware, Inc. nor the names of its
|
||||||
specific prior written permission.
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR
|
THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR
|
||||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
DISCLAIMED. IN NO EVENT SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT,
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||||
OF SUCH DAMAGE.
|
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
Additional License(s)
|
Additional License(s)
|
||||||
|
|
||||||
@@ -186,13 +188,9 @@ cmake-2.4.8/Utilities/cmtar/compat/gethostname.c:
|
|||||||
|
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
|
||||||
*
|
* Author : Per Foreby, perf@efd.lth.se
|
||||||
Author : Per Foreby, perf@efd.lth.se
|
* Author : Juergen Pfeifer, juergen.pfeifer@gmx.net
|
||||||
*
|
|
||||||
Author : Juergen Pfeifer, juergen.pfeifer@gmx.net
|
|
||||||
*
|
|
||||||
|
|
||||||
*
|
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@@ -208,9 +206,8 @@ details.
|
|||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
|
|
||||||
Skeleton parser for Yacc-like parsing with Bison,
|
Skeleton parser for Yacc-like parsing with Bison,
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software
|
||||||
Software Foundati
|
Foundation, Inc.
|
||||||
on, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -253,8 +250,7 @@ cmake-2.4.8/Utilities/cmzlib/zlib.h:
|
|||||||
in a product, an acknowledgment in the product documentation would be
|
in a product, an acknowledgment in the product documentation would be
|
||||||
appreciated but is not required.
|
appreciated but is not required.
|
||||||
2. Altered source versions must be plainly marked as such, and must
|
2. Altered source versions must be plainly marked as such, and must
|
||||||
not be
|
not be misrepresented as being the original software.
|
||||||
misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source
|
3. This notice may not be removed or altered from any source
|
||||||
distribution.
|
distribution.
|
||||||
|
|
||||||
@@ -262,26 +258,19 @@ distribution.
|
|||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
This source code was modified by Martin Hedenfalk
|
This source code was modified by Martin Hedenfalk for use in Curl. His
|
||||||
for
|
latest changes were done 2000-09-18.
|
||||||
use in Curl. His latest changes were done 2000-09-18.
|
|
||||||
|
|
||||||
It has since been patched away like a madman by Daniel Stenberg
|
It has since been patched away like a madman by Daniel Stenberg to make it
|
||||||
to make it better applied to curl conditions, and to
|
better applied to curl conditions, and to make it not use globals, pollute
|
||||||
make
|
name space and more. This source code awaits a rewrite to work around the
|
||||||
it not use globals, pollute name space and more. This source code
|
paragraph 2 in the BSD licenses as explained below.
|
||||||
awaits a
|
|
||||||
rewrite to work around the paragraph 2 in the BSD licenses as explained
|
|
||||||
below.
|
|
||||||
|
|
||||||
Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan
|
Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan
|
||||||
It has since been patched and modified a lot by Daniel Stenberg
|
It has since been patched and modified a lot by Daniel Stenberg to make it
|
||||||
to make it better applied to curl conditions, and to
|
better applied to curl conditions, and to make it not use globals, pollute
|
||||||
make
|
name space and more. This source code awaits a rewrite to work around the
|
||||||
it not use globals, pollute name space and more. This source code
|
paragraph 2 in the BSD licenses as explained below.
|
||||||
awaits a
|
|
||||||
rewrite to work around the paragraph 2 in the BSD licenses as explained
|
|
||||||
below.
|
|
||||||
|
|
||||||
Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan
|
Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan
|
||||||
(Royal Institute of Technology, Stockholm, Sweden).
|
(Royal Institute of Technology, Stockholm, Sweden).
|
||||||
@@ -304,19 +293,15 @@ awaits a
|
|||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
PURPOSE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
LIABLE
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
CONSEQUENTIAL
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
SUCH DAMAGE.
|
||||||
|
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
@@ -332,8 +317,7 @@ STRICT
|
|||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
cmake-2.4.8/Utilities/cmcurl/inet_pton.c,
|
cmake-2.4.8/Utilities/cmcurl/inet_pton.c,
|
||||||
cmake-2.4.8/Source/CTest/Curl/inet_pto
|
cmake-2.4.8/Source/CTest/Curl/inet_pton.c:
|
||||||
n.c:
|
|
||||||
This is from the BIND 4.9.4 release, modified to compile by itself
|
This is from the BIND 4.9.4 release, modified to compile by itself
|
||||||
|
|
||||||
Copyright (c) 1996 by Internet Software Consortium.
|
Copyright (c) 1996 by Internet Software Consortium.
|
||||||
@@ -343,16 +327,13 @@ n.c:
|
|||||||
copyright notice and this permission notice appear in all copies.
|
copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||||
DISCLAIMS
|
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||||
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||||
WARRANTIES
|
INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
|
||||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
|
||||||
CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
||||||
OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
|
||||||
@@ -369,24 +350,19 @@ OF THIS
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. The name of the author may not be used to endorse or promote products
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* derived from this software without specific prior written
|
* derived from this software without specific prior written permission.
|
||||||
permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
PURPOSE
|
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
CONSEQUENTIAL
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
ANY WAY
|
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
** SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
@@ -441,15 +417,12 @@ ANY WAY
|
|||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
CONSEQUENTIAL
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
SUCH DAMAGE.
|
SUCH DAMAGE.
|
||||||
@@ -480,59 +453,32 @@ STRICT
|
|||||||
|
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||||
*
|
|
||||||
Copyright (c) 1998,2000 Free Software Foundation, Inc.
|
Copyright (c) 1998,2000 Free Software Foundation, Inc.
|
||||||
*
|
|
||||||
|
|
||||||
*
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a *
|
|
||||||
copy of this software and associated documentation files (the
|
copy of this software and associated documentation files (the
|
||||||
*
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
"Software"), to deal in the Software without restriction, including
|
||||||
*
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
*
|
distribute, distribute with modifications, sublicense, and/or sell copies
|
||||||
distribute, distribute with modifications, sublicense, and/or sell
|
of the Software, and to permit persons to whom the Software is furnished
|
||||||
*
|
to do so, subject to the following conditions:
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
*
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
|
|
||||||
*
|
The above copyright notice and this permission notice shall be included in
|
||||||
The above copyright notice and this permission notice shall be
|
all copies or substantial portions of the Software.
|
||||||
included *
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
|
|
||||||
*
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
EXPRESS *
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
*
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. *
|
|
||||||
IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, *
|
|
||||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
*
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
|
||||||
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
|
||||||
|
|
||||||
*
|
|
||||||
|
|
||||||
*
|
Except as contained in this notice, the name(s) of the above copyright
|
||||||
Except as contained in this notice, the name(s) of the above
|
holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
copyright *
|
use or other dealings in this Software without prior written
|
||||||
holders shall not be used in advertising or otherwise to promote the
|
|
||||||
*
|
|
||||||
sale, use or other dealings in this Software without prior written
|
|
||||||
*
|
|
||||||
authorization.
|
authorization.
|
||||||
*
|
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
@@ -551,30 +497,25 @@ copyright *
|
|||||||
3. The name of the author may not be used to endorse or promote products
|
3. The name of the author may not be used to endorse or promote products
|
||||||
derived from this software without specific prior written permission.
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||||
WARRANTIES,
|
|
||||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
PROFITS;
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
PURPOSE
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
CONSEQUENTIAL
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
SUCH DAMAGE.
|
SUCH DAMAGE.
|
||||||
@@ -586,7 +527,6 @@ Fred Fish's Dbug Library
|
|||||||
|
|
||||||
Use of any of this software is governed by the terms of the license below:
|
Use of any of this software is governed by the terms of the license below:
|
||||||
|
|
||||||
*
|
|
||||||
* N O T I C E *
|
* N O T I C E *
|
||||||
* *
|
* *
|
||||||
* Copyright Abandoned, 1987, Fred Fish *
|
* Copyright Abandoned, 1987, Fred Fish *
|
||||||
@@ -610,7 +550,6 @@ Use of any of this software is governed by the terms of the license below:
|
|||||||
* The author makes no warranty of any kind with respect to this *
|
* The author makes no warranty of any kind with respect to this *
|
||||||
* product and explicitly disclaims any implied warranties of mer- *
|
* product and explicitly disclaims any implied warranties of mer- *
|
||||||
* chantability or fitness for any particular purpose. *
|
* chantability or fitness for any particular purpose. *
|
||||||
*
|
|
||||||
|
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
|
||||||
@@ -619,7 +558,6 @@ dbug_analyze.c (part of Fred Fish's Dbug Library)
|
|||||||
|
|
||||||
Use of any of this software is governed by the terms of the license below:
|
Use of any of this software is governed by the terms of the license below:
|
||||||
|
|
||||||
* *
|
|
||||||
* Copyright Abandoned, 1987, Fred Fish *
|
* Copyright Abandoned, 1987, Fred Fish *
|
||||||
* *
|
* *
|
||||||
* *
|
* *
|
||||||
@@ -640,7 +578,7 @@ Use of any of this software is governed by the terms of the license below:
|
|||||||
* *
|
* *
|
||||||
* The author makes no warranty of any kind with respect to this *
|
* The author makes no warranty of any kind with respect to this *
|
||||||
* product and explicitly disclaims any implied warranties of mer- *
|
* product and explicitly disclaims any implied warranties of mer- *
|
||||||
* chantability or fitness for any particular purpose.
|
* chantability or fitness for any particular purpose. *
|
||||||
|
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
|
||||||
@@ -1454,11 +1392,9 @@ text:
|
|||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
not,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place -
|
330, Boston, MA 02111-1307, USA. */
|
||||||
Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1549,101 +1485,118 @@ Use of any of this software is governed by the terms of the license below:
|
|||||||
Unicode Terms of Use
|
Unicode Terms of Use
|
||||||
|
|
||||||
For the general privacy policy governing access to this site, see the
|
For the general privacy policy governing access to this site, see the
|
||||||
Unicode Privacy Policy. For trademark usage, see the Unicode Consortium<75>
|
Unicode Privacy Policy. For trademark usage, see the Unicode
|
||||||
Trademarks and Logo Policy.
|
Consortium (R) Trademarks and Logo Policy.
|
||||||
Notice to End User: Terms of Use
|
Notice to End User: Terms of Use
|
||||||
Carefully read the following legal agreement ("Agreement"). Use or copying
|
Carefully read the following legal agreement ("Agreement"). Use or
|
||||||
of the software and/or codes provided with this agreement (The "Software")
|
copying of the software and/or codes provided with this agreement (The
|
||||||
constitutes your acceptance of these terms
|
"Software") constitutes your acceptance of these terms
|
||||||
|
|
||||||
1. Unicode Copyright.
|
1. Unicode Copyright.
|
||||||
1. Copyright <EFBFBD> 1991-2008 Unicode, Inc. All rights reserved.
|
1. Copyright (c) 1991-2008 Unicode, Inc. All rights reserved.
|
||||||
2. Certain documents and files on this website contain a legend
|
2. Certain documents and files on this website contain a
|
||||||
indicating that "Modification is permitted." Any person is hereby authorized,
|
legend indicating that "Modification is permitted." Any person
|
||||||
without fee, to modify such documents and files to create derivative works
|
is hereby authorized, without fee, to modify such documents
|
||||||
conforming to the Unicode<64> Standard, subject to Terms and Conditions herein.
|
and files to create derivative works conforming to the
|
||||||
|
Unicode (R) Standard, subject to Terms and Conditions herein.
|
||||||
3. Any person is hereby authorized, without fee, to view, use,
|
3. Any person is hereby authorized, without fee, to view, use,
|
||||||
reproduce, and distribute all documents and files solely for informational
|
reproduce, and distribute all documents and files solely for
|
||||||
purposes in the creation of products supporting the Unicode Standard, subject to
|
informational purposes in the creation of products supporting
|
||||||
the Terms and Conditions herein.
|
the Unicode Standard, subject to the Terms and Conditions
|
||||||
4. Further specifications of rights and restrictions pertaining to
|
herein.
|
||||||
the use of the particular set of data files known as the "Unicode Character
|
4. Further specifications of rights and restrictions
|
||||||
Database" can be found in Exhibit 1.
|
pertaining to the use of the particular set of data files
|
||||||
5. Each version of the Unicode Standard has further specifications
|
known as the "Unicode Character Database" can be found in
|
||||||
of rights and restrictions of use. For the book editions, these are found on the
|
Exhibit 1.
|
||||||
back of the title page. For the online edition, certain files (such as the PDF
|
5. Each version of the Unicode Standard has further
|
||||||
files for book chapters and code charts) carry specific restrictions. All other
|
specifications of rights and restrictions of use. For the book
|
||||||
files are covered under these general Terms of Use. To request a permission to
|
editions, these are found on the back of the title page. For
|
||||||
reproduce any part of the Unicode Standard, please contact the Unicode Consortium.
|
the online edition, certain files (such as the PDF files for
|
||||||
6. No license is granted to "mirror" the Unicode website where a
|
book chapters and code charts) carry specific restrictions.
|
||||||
fee is charged for access to the "mirror" site.
|
All other files are covered under these general Terms of Use.
|
||||||
7. Modification is not permitted with respect to this document. All
|
To request a permission to reproduce any part of the Unicode
|
||||||
copies of this document must be verbatim.
|
Standard, please contact the Unicode Consortium.
|
||||||
|
6. No license is granted to "mirror" the Unicode website where
|
||||||
|
a fee is charged for access to the "mirror" site.
|
||||||
|
7. Modification is not permitted with respect to this
|
||||||
|
document. All copies of this document must be verbatim.
|
||||||
2. Restricted Rights Legend. Any technical data or software which is
|
2. Restricted Rights Legend. Any technical data or software which is
|
||||||
licensed to the United States of America, its agencies and/or instrumentalities
|
licensed to the United States of America, its agencies and/or
|
||||||
under this Agreement is commercial technical data or commercial computer
|
instrumentalities under this Agreement is commercial technical data
|
||||||
software developed exclusively at private expense as defined in FAR 2.101, or
|
or commercial computer software developed exclusively at private
|
||||||
DFARS 252.227-7014 (June 1995), as applicable. For technical data, use,
|
expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995),
|
||||||
duplication, or disclosure by the Government is subject to restrictions as set
|
as applicable. For technical data, use, duplication, or disclosure
|
||||||
forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and
|
by the Government is subject to restrictions as set forth in DFARS
|
||||||
this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202,
|
202.227-7015 Technical Data, Commercial and Items (Nov 1995) and
|
||||||
as applicable, use, duplication or disclosure by the Government is subject to
|
this Agreement. For Software, in accordance with FAR 12-212 or DFARS
|
||||||
the restrictions set forth in this Agreement.
|
227-7202, as applicable, use, duplication or disclosure by the
|
||||||
|
Government is subject to the restrictions set forth in this
|
||||||
|
Agreement.
|
||||||
3. Warranties and Disclaimers.
|
3. Warranties and Disclaimers.
|
||||||
1. This publication and/or website may include technical or
|
1. This publication and/or website may include technical or
|
||||||
typographical errors or other inaccuracies . Changes are periodically added to
|
typographical errors or other inaccuracies . Changes are
|
||||||
the information herein; these changes will be incorporated in new editions of
|
periodically added to the information herein; these changes
|
||||||
the publication and/or website. Unicode may make improvements and/or changes in
|
will be incorporated in new editions of the publication and/or
|
||||||
the product(s) and/or program(s) described in this publication and/or website at
|
website. Unicode may make improvements and/or changes in the
|
||||||
any time.
|
product(s) and/or program(s) described in this publication
|
||||||
2. If this file has been purchased on magnetic or optical media
|
and/or website at any time.
|
||||||
from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange
|
2. If this file has been purchased on magnetic or optical
|
||||||
of the defective media within ninety (90) days of original purchase.
|
media from Unicode, Inc. the sole and exclusive remedy for any
|
||||||
|
claim will be exchange of the defective media within ninety
|
||||||
|
(90) days of original purchase.
|
||||||
3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR
|
3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR
|
||||||
SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS,
|
SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND
|
||||||
IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF
|
EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE
|
LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||||
AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS
|
PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE AND ITS
|
||||||
PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED
|
LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN
|
||||||
TO THIS PUBLICATION OR THE UNICODE WEBSITE.
|
THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE
|
||||||
|
REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE
|
||||||
|
WEBSITE.
|
||||||
4. Waiver of Damages. In no event shall Unicode or its licensors be
|
4. Waiver of Damages. In no event shall Unicode or its licensors be
|
||||||
liable for any special, incidental, indirect or consequential damages of any
|
liable for any special, incidental, indirect or consequential
|
||||||
kind, or any damages whatsoever, whether or not Unicode was advised of the
|
damages of any kind, or any damages whatsoever, whether or not
|
||||||
possibility of the damage, including, without limitation, those resulting from
|
Unicode was advised of the possibility of the damage, including,
|
||||||
the following: loss of use, data or profits, in connection with the use,
|
without limitation, those resulting from the following: loss of use,
|
||||||
modification or distribution of this information or its derivatives.
|
data or profits, in connection with the use, modification or
|
||||||
|
distribution of this information or its derivatives.
|
||||||
5. Trademarks.
|
5. Trademarks.
|
||||||
1. Unicode and the Unicode logo are registered trademarks of
|
1. Unicode and the Unicode logo are registered trademarks of
|
||||||
Unicode, Inc.
|
Unicode, Inc.
|
||||||
2. This site contains product names and corporate names of other
|
2. This site contains product names and corporate names of
|
||||||
companies. All product names and company names and logos mentioned herein are
|
other companies. All product names and company names and logos
|
||||||
the trademarks or registered trademarks of their respective owners. Other
|
mentioned herein are the trademarks or registered trademarks
|
||||||
products and corporate names mentioned herein which are trademarks of a third
|
of their respective owners. Other products and corporate names
|
||||||
party are used only for explanation and for the owners' benefit and with no
|
mentioned herein which are trademarks of a third party are
|
||||||
intent to infringe.
|
used only for explanation and for the owners' benefit and with
|
||||||
3. Use of third party products or information referred to herein is
|
no intent to infringe.
|
||||||
at the user<65>s risk.
|
3. Use of third party products or information referred to
|
||||||
|
herein is at the user's risk.
|
||||||
6. Miscellaneous.
|
6. Miscellaneous.
|
||||||
1. Jurisdiction and Venue. This server is operated from a location
|
1. Jurisdiction and Venue. This server is operated from a
|
||||||
in the State of California, United States of America. Unicode makes no
|
location in the State of California, United States of America.
|
||||||
representation that the materials are appropriate for use in other locations. If
|
Unicode makes no representation that the materials are
|
||||||
you access this server from other locations, you are responsible for compliance
|
appropriate for use in other locations. If you access this
|
||||||
with local laws. This Agreement, all use of this site and any claims and damages
|
server from other locations, you are responsible for
|
||||||
resulting from use of this site are governed solely by the laws of the State of
|
compliance with local laws. This Agreement, all use of this
|
||||||
California without regard to any principles which would apply the laws of a
|
site and any claims and damages resulting from use of this
|
||||||
different jurisdiction. The user agrees that any disputes regarding this site
|
site are governed solely by the laws of the State of
|
||||||
shall be resolved solely in the courts located in Santa Clara County,
|
California without regard to any principles which would apply
|
||||||
California. The user agrees said courts have personal jurisdiction and agree to
|
the laws of a different jurisdiction. The user agrees that any
|
||||||
|
disputes regarding this site shall be resolved solely in the
|
||||||
|
courts located in Santa Clara County, California. The user
|
||||||
|
agrees said courts have personal jurisdiction and agree to
|
||||||
waive any right to transfer the dispute to any other forum.
|
waive any right to transfer the dispute to any other forum.
|
||||||
2. Modification by Unicode Unicode shall have the right to modify
|
2. Modification by Unicode Unicode shall have the right to
|
||||||
this Agreement at any time by posting it to this site. The user may not assign
|
modify this Agreement at any time by posting it to this site.
|
||||||
any part of this Agreement without Unicode<64>s prior written consent.
|
The user may not assign any part of this Agreement without
|
||||||
3. Taxes. The user agrees to pay any taxes arising from access to
|
Unicode's prior written consent.
|
||||||
this website or use of the information herein, except for those based on
|
3. Taxes. The user agrees to pay any taxes arising from access
|
||||||
Unicode<EFBFBD>s net income.
|
to this website or use of the information herein, except for
|
||||||
4. Severability. If any provision of this Agreement is declared
|
those based on Unicode's net income.
|
||||||
invalid or unenforceable, the remaining provisions of this Agreement shall
|
4. Severability. If any provision of this Agreement is
|
||||||
remain in effect.
|
declared invalid or unenforceable, the remaining provisions of
|
||||||
|
this Agreement shall remain in effect.
|
||||||
5. Entire Agreement. This Agreement constitutes the entire
|
5. Entire Agreement. This Agreement constitutes the entire
|
||||||
agreement between the parties.
|
agreement between the parties.
|
||||||
|
|
||||||
@@ -1666,7 +1619,7 @@ OR SOFTWARE.
|
|||||||
|
|
||||||
COPYRIGHT AND PERMISSION NOTICE
|
COPYRIGHT AND PERMISSION NOTICE
|
||||||
|
|
||||||
Copyright <EFBFBD> 1991-2008 Unicode, Inc. All rights reserved. Distributed under
|
Copyright (c) 1991-2008 Unicode, Inc. All rights reserved. Distributed under
|
||||||
the Terms of Use in http://www.unicode.org/copyright.html.
|
the Terms of Use in http://www.unicode.org/copyright.html.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
@@ -2295,8 +2248,7 @@ Use of any of this software is governed by the terms of the license below:
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
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
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
2
VERSION
2
VERSION
@@ -1,4 +1,4 @@
|
|||||||
MYSQL_VERSION_MAJOR=5
|
MYSQL_VERSION_MAJOR=5
|
||||||
MYSQL_VERSION_MINOR=5
|
MYSQL_VERSION_MINOR=5
|
||||||
MYSQL_VERSION_PATCH=8
|
MYSQL_VERSION_PATCH=9
|
||||||
MYSQL_VERSION_EXTRA=
|
MYSQL_VERSION_EXTRA=
|
||||||
|
@@ -8284,6 +8284,14 @@ int main(int argc, char **argv)
|
|||||||
var_set_int("$VIEW_PROTOCOL", view_protocol);
|
var_set_int("$VIEW_PROTOCOL", view_protocol);
|
||||||
var_set_int("$CURSOR_PROTOCOL", cursor_protocol);
|
var_set_int("$CURSOR_PROTOCOL", cursor_protocol);
|
||||||
|
|
||||||
|
var_set_int("$ENABLED_QUERY_LOG", 1);
|
||||||
|
var_set_int("$ENABLED_ABORT_ON_ERROR", 1);
|
||||||
|
var_set_int("$ENABLED_RESULT_LOG", 1);
|
||||||
|
var_set_int("$ENABLED_CONNECT_LOG", 0);
|
||||||
|
var_set_int("$ENABLED_WARNINGS", 1);
|
||||||
|
var_set_int("$ENABLED_INFO", 0);
|
||||||
|
var_set_int("$ENABLED_METADATA", 0);
|
||||||
|
|
||||||
DBUG_PRINT("info",("result_file: '%s'",
|
DBUG_PRINT("info",("result_file: '%s'",
|
||||||
result_file_name ? result_file_name : ""));
|
result_file_name ? result_file_name : ""));
|
||||||
verbose_msg("Results saved in '%s'.",
|
verbose_msg("Results saved in '%s'.",
|
||||||
@@ -8430,20 +8438,62 @@ int main(int argc, char **argv)
|
|||||||
case Q_DISCONNECT:
|
case Q_DISCONNECT:
|
||||||
case Q_DIRTY_CLOSE:
|
case Q_DIRTY_CLOSE:
|
||||||
do_close_connection(command); break;
|
do_close_connection(command); break;
|
||||||
case Q_ENABLE_QUERY_LOG: disable_query_log=0; break;
|
case Q_ENABLE_QUERY_LOG:
|
||||||
case Q_DISABLE_QUERY_LOG: disable_query_log=1; break;
|
disable_query_log= 0;
|
||||||
case Q_ENABLE_ABORT_ON_ERROR: abort_on_error=1; break;
|
var_set_int("$ENABLED_QUERY_LOG", 1);
|
||||||
case Q_DISABLE_ABORT_ON_ERROR: abort_on_error=0; break;
|
break;
|
||||||
case Q_ENABLE_RESULT_LOG: disable_result_log=0; break;
|
case Q_DISABLE_QUERY_LOG:
|
||||||
case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
|
disable_query_log= 1;
|
||||||
case Q_ENABLE_CONNECT_LOG: disable_connect_log=0; break;
|
var_set_int("$ENABLED_QUERY_LOG", 0);
|
||||||
case Q_DISABLE_CONNECT_LOG: disable_connect_log=1; break;
|
break;
|
||||||
case Q_ENABLE_WARNINGS: disable_warnings=0; break;
|
case Q_ENABLE_ABORT_ON_ERROR:
|
||||||
case Q_DISABLE_WARNINGS: disable_warnings=1; break;
|
abort_on_error= 1;
|
||||||
case Q_ENABLE_INFO: disable_info=0; break;
|
var_set_int("$ENABLED_ABORT_ON_ERROR", 1);
|
||||||
case Q_DISABLE_INFO: disable_info=1; break;
|
break;
|
||||||
case Q_ENABLE_METADATA: display_metadata=1; break;
|
case Q_DISABLE_ABORT_ON_ERROR:
|
||||||
case Q_DISABLE_METADATA: display_metadata=0; break;
|
abort_on_error= 0;
|
||||||
|
var_set_int("$ENABLED_ABORT_ON_ERROR", 0);
|
||||||
|
break;
|
||||||
|
case Q_ENABLE_RESULT_LOG:
|
||||||
|
disable_result_log= 0;
|
||||||
|
var_set_int("$ENABLED_RESULT_LOG", 1);
|
||||||
|
break;
|
||||||
|
case Q_DISABLE_RESULT_LOG:
|
||||||
|
disable_result_log=1;
|
||||||
|
var_set_int("$ENABLED_RESULT_LOG", 0);
|
||||||
|
break;
|
||||||
|
case Q_ENABLE_CONNECT_LOG:
|
||||||
|
disable_connect_log=0;
|
||||||
|
var_set_int("$ENABLED_CONNECT_LOG", 1);
|
||||||
|
break;
|
||||||
|
case Q_DISABLE_CONNECT_LOG:
|
||||||
|
disable_connect_log=1;
|
||||||
|
var_set_int("$ENABLED_CONNECT_LOG", 0);
|
||||||
|
break;
|
||||||
|
case Q_ENABLE_WARNINGS:
|
||||||
|
disable_warnings= 0;
|
||||||
|
var_set_int("$ENABLED_WARNINGS", 1);
|
||||||
|
break;
|
||||||
|
case Q_DISABLE_WARNINGS:
|
||||||
|
disable_warnings= 1;
|
||||||
|
var_set_int("$ENABLED_WARNINGS", 0);
|
||||||
|
break;
|
||||||
|
case Q_ENABLE_INFO:
|
||||||
|
disable_info= 0;
|
||||||
|
var_set_int("$ENABLED_INFO", 1);
|
||||||
|
break;
|
||||||
|
case Q_DISABLE_INFO:
|
||||||
|
disable_info= 1;
|
||||||
|
var_set_int("$ENABLED_INFO", 0);
|
||||||
|
break;
|
||||||
|
case Q_ENABLE_METADATA:
|
||||||
|
display_metadata= 1;
|
||||||
|
var_set_int("$ENABLED_METADATA", 1);
|
||||||
|
break;
|
||||||
|
case Q_DISABLE_METADATA:
|
||||||
|
display_metadata= 0;
|
||||||
|
var_set_int("$ENABLED_METADATA", 0);
|
||||||
|
break;
|
||||||
case Q_SOURCE: do_source(command); break;
|
case Q_SOURCE: do_source(command); break;
|
||||||
case Q_SLEEP: do_sleep(command, 0); break;
|
case Q_SLEEP: do_sleep(command, 0); break;
|
||||||
case Q_REAL_SLEEP: do_sleep(command, 1); break;
|
case Q_REAL_SLEEP: do_sleep(command, 1); break;
|
||||||
|
@@ -118,6 +118,7 @@ IF(UNIX)
|
|||||||
OPTION(WITH_PIC "" ON) # Why?
|
OPTION(WITH_PIC "" ON) # Why?
|
||||||
|
|
||||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
IF(NOT IGNORE_AIO_CHECK)
|
||||||
# Ensure aio is available on Linux (required by InnoDB)
|
# Ensure aio is available on Linux (required by InnoDB)
|
||||||
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
|
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
|
||||||
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
|
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
|
||||||
@@ -128,8 +129,11 @@ IF(UNIX)
|
|||||||
Debian/Ubuntu: apt-get install libaio-dev
|
Debian/Ubuntu: apt-get install libaio-dev
|
||||||
RedHat/Fedora/Oracle Linux: yum install libaio-devel
|
RedHat/Fedora/Oracle Linux: yum install libaio-devel
|
||||||
SuSE: zypper install libaio-devel
|
SuSE: zypper install libaio-devel
|
||||||
|
|
||||||
|
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
|
||||||
")
|
")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Enable fast mutexes on Linux
|
# Enable fast mutexes on Linux
|
||||||
OPTION(WITH_FAST_MUTEXES "" ON)
|
OPTION(WITH_FAST_MUTEXES "" ON)
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
# Build as per default RPM layout, with prefix=/usr
|
# Build as per default RPM layout, with prefix=/usr
|
||||||
#
|
#
|
||||||
# DEB
|
# DEB
|
||||||
# Build as per STANDALONE, prefix=/opt/mysql-$major.$minor
|
# Build as per STANDALONE, prefix=/opt/mysql/server-$major.$minor
|
||||||
#
|
#
|
||||||
# SVR4
|
# SVR4
|
||||||
# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
|
# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
|
||||||
@@ -74,7 +74,7 @@ IF(UNIX)
|
|||||||
IF(INSTALL_LAYOUT MATCHES "RPM")
|
IF(INSTALL_LAYOUT MATCHES "RPM")
|
||||||
SET(default_prefix "/usr")
|
SET(default_prefix "/usr")
|
||||||
ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
|
ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
|
||||||
SET(default_prefix "/opt/${MYSQL_BASE_VERSION}")
|
SET(default_prefix "/opt/mysql/server-${MYSQL_BASE_VERSION}")
|
||||||
# This is required to avoid "cpack -GDEB" default of prefix=/usr
|
# This is required to avoid "cpack -GDEB" default of prefix=/usr
|
||||||
SET(CPACK_SET_DESTDIR ON)
|
SET(CPACK_SET_DESTDIR ON)
|
||||||
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
|
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
|
||||||
|
54
cmake/maintainer.cmake
Normal file
54
cmake/maintainer.cmake
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; version 2 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
INCLUDE(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
# Setup GCC (GNU C compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_WARNINGS
|
||||||
|
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
|
||||||
|
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
|
||||||
|
HAVE_DECLARATION_AFTER_STATEMENT)
|
||||||
|
IF(HAVE_DECLARATION_AFTER_STATEMENT)
|
||||||
|
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT
|
||||||
|
"-Wdeclaration-after-statement")
|
||||||
|
ENDIF()
|
||||||
|
SET(MY_MAINTAINER_C_WARNINGS
|
||||||
|
"${MY_MAINTAINER_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
|
||||||
|
CACHE STRING "C warning options used in maintainer builds.")
|
||||||
|
# Do not make warnings in checks into errors.
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
# Setup G++ (GNU C++ compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_CXX_WARNINGS
|
||||||
|
"${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter"
|
||||||
|
CACHE STRING "C++ warning options used in maintainer builds.")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
# Setup ICC (Intel C Compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_WARNINGS "-Wcheck")
|
||||||
|
SET(MY_MAINTAINER_C_WARNINGS "${MY_MAINTAINER_WARNINGS}"
|
||||||
|
CACHE STRING "C warning options used in maintainer builds.")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
# Setup ICPC (Intel C++ Compiler) warning options.
|
||||||
|
MACRO(SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS)
|
||||||
|
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_WARNINGS}"
|
||||||
|
CACHE STRING "C++ warning options used in maintainer builds.")
|
||||||
|
ENDMACRO()
|
||||||
|
|
@@ -17,7 +17,6 @@ INCLUDE(CheckSymbolExists)
|
|||||||
INCLUDE(CheckCSourceRuns)
|
INCLUDE(CheckCSourceRuns)
|
||||||
INCLUDE(CheckCSourceCompiles)
|
INCLUDE(CheckCSourceCompiles)
|
||||||
|
|
||||||
SET(TARGET_OS_SOLARIS 1)
|
|
||||||
# Enable 64 bit file offsets
|
# Enable 64 bit file offsets
|
||||||
SET(_FILE_OFFSET_BITS 64)
|
SET(_FILE_OFFSET_BITS 64)
|
||||||
|
|
||||||
|
@@ -226,6 +226,7 @@
|
|||||||
#cmakedefine HAVE_PTHREAD_THREADMASK 1
|
#cmakedefine HAVE_PTHREAD_THREADMASK 1
|
||||||
#cmakedefine HAVE_PTHREAD_YIELD_NP 1
|
#cmakedefine HAVE_PTHREAD_YIELD_NP 1
|
||||||
#cmakedefine HAVE_PTHREAD_YIELD_ZERO_ARG 1
|
#cmakedefine HAVE_PTHREAD_YIELD_ZERO_ARG 1
|
||||||
|
#cmakedefine PTHREAD_ONCE_INITIALIZER @PTHREAD_ONCE_INITIALIZER@
|
||||||
#cmakedefine HAVE_PUTENV 1
|
#cmakedefine HAVE_PUTENV 1
|
||||||
#cmakedefine HAVE_RE_COMP 1
|
#cmakedefine HAVE_RE_COMP 1
|
||||||
#cmakedefine HAVE_REGCOMP 1
|
#cmakedefine HAVE_REGCOMP 1
|
||||||
@@ -406,7 +407,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#cmakedefine TARGET_OS_LINUX 1
|
#cmakedefine TARGET_OS_LINUX 1
|
||||||
#cmakedefine TARGET_OS_SOLARIS 1
|
|
||||||
|
|
||||||
#cmakedefine HAVE_WCTYPE_H 1
|
#cmakedefine HAVE_WCTYPE_H 1
|
||||||
#cmakedefine HAVE_WCHAR_H 1
|
#cmakedefine HAVE_WCHAR_H 1
|
||||||
|
@@ -269,6 +269,49 @@ ENDIF()
|
|||||||
#
|
#
|
||||||
FIND_PACKAGE (Threads)
|
FIND_PACKAGE (Threads)
|
||||||
|
|
||||||
|
FUNCTION(MY_CHECK_PTHREAD_ONCE_INIT)
|
||||||
|
CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG)
|
||||||
|
IF(NOT HAVE_WERROR_FLAG)
|
||||||
|
RETURN()
|
||||||
|
ENDIF()
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
|
||||||
|
CHECK_C_SOURCE_COMPILES("
|
||||||
|
#include <pthread.h>
|
||||||
|
void foo(void) {}
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
pthread_once_t once_control = PTHREAD_ONCE_INIT;
|
||||||
|
pthread_once(&once_control, foo);
|
||||||
|
return 0;
|
||||||
|
}"
|
||||||
|
HAVE_PTHREAD_ONCE_INIT
|
||||||
|
)
|
||||||
|
# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6611808
|
||||||
|
IF(NOT HAVE_PTHREAD_ONCE_INIT)
|
||||||
|
CHECK_C_SOURCE_COMPILES("
|
||||||
|
#include <pthread.h>
|
||||||
|
void foo(void) {}
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
pthread_once_t once_control = { PTHREAD_ONCE_INIT };
|
||||||
|
pthread_once(&once_control, foo);
|
||||||
|
return 0;
|
||||||
|
}"
|
||||||
|
HAVE_ARRAY_PTHREAD_ONCE_INIT
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
IF(HAVE_PTHREAD_ONCE_INIT)
|
||||||
|
SET(PTHREAD_ONCE_INITIALIZER "PTHREAD_ONCE_INIT" PARENT_SCOPE)
|
||||||
|
ENDIF()
|
||||||
|
IF(HAVE_ARRAY_PTHREAD_ONCE_INIT)
|
||||||
|
SET(PTHREAD_ONCE_INITIALIZER "{ PTHREAD_ONCE_INIT }" PARENT_SCOPE)
|
||||||
|
ENDIF()
|
||||||
|
ENDFUNCTION()
|
||||||
|
|
||||||
|
IF(CMAKE_USE_PTHREADS_INIT)
|
||||||
|
MY_CHECK_PTHREAD_ONCE_INIT()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tests for functions
|
# Tests for functions
|
||||||
#
|
#
|
||||||
|
19
dbug/dbug.c
19
dbug/dbug.c
@@ -2377,6 +2377,25 @@ void _db_flush_()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __WIN__
|
||||||
|
void _db_suicide_()
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
sigset_t new_mask;
|
||||||
|
sigfillset(&new_mask);
|
||||||
|
|
||||||
|
fprintf(stderr, "SIGKILL myself\n");
|
||||||
|
fflush(stderr);
|
||||||
|
|
||||||
|
retval= kill(getpid(), SIGKILL);
|
||||||
|
assert(retval == 0);
|
||||||
|
retval= sigsuspend(&new_mask);
|
||||||
|
fprintf(stderr, "sigsuspend returned %d errno %d \n", retval, errno);
|
||||||
|
assert(FALSE); /* With full signal mask, we should never return here. */
|
||||||
|
}
|
||||||
|
#endif /* ! __WIN__ */
|
||||||
|
|
||||||
|
|
||||||
void _db_lock_file_()
|
void _db_lock_file_()
|
||||||
{
|
{
|
||||||
CODE_STATE *cs;
|
CODE_STATE *cs;
|
||||||
|
@@ -59,6 +59,4 @@ SET(HEADERS
|
|||||||
)
|
)
|
||||||
|
|
||||||
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
|
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
|
||||||
INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h" )
|
INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/mysql COMPONENT Development FILES_MATCHING PATTERN "*.h")
|
||||||
|
|
||||||
|
|
||||||
|
@@ -132,7 +132,8 @@ extern const char* _db_get_func_(void);
|
|||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
#define DBUG_SUICIDE() DBUG_ABORT()
|
#define DBUG_SUICIDE() DBUG_ABORT()
|
||||||
#else
|
#else
|
||||||
#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause())
|
extern void _db_suicide_();
|
||||||
|
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /* No debugger */
|
#else /* No debugger */
|
||||||
|
@@ -214,7 +214,11 @@ int pthread_cancel(pthread_t thread);
|
|||||||
typedef void *(* pthread_handler)(void *);
|
typedef void *(* pthread_handler)(void *);
|
||||||
|
|
||||||
#define my_pthread_once_t pthread_once_t
|
#define my_pthread_once_t pthread_once_t
|
||||||
|
#if defined(PTHREAD_ONCE_INITIALIZER)
|
||||||
|
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER
|
||||||
|
#else
|
||||||
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
|
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
|
||||||
|
#endif
|
||||||
#define my_pthread_once(C,F) pthread_once(C,F)
|
#define my_pthread_once(C,F) pthread_once(C,F)
|
||||||
|
|
||||||
/* Test first for RTS or FSU threads */
|
/* Test first for RTS or FSU threads */
|
||||||
|
@@ -42,6 +42,8 @@ struct mysql_event
|
|||||||
LOG events occurs before emitting to the general query log.
|
LOG events occurs before emitting to the general query log.
|
||||||
ERROR events occur before transmitting errors to the user.
|
ERROR events occur before transmitting errors to the user.
|
||||||
RESULT events occur after transmitting a resultset to the user.
|
RESULT events occur after transmitting a resultset to the user.
|
||||||
|
STATUS events occur after transmitting a resultset or errors
|
||||||
|
to the user.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MYSQL_AUDIT_GENERAL_CLASS 0
|
#define MYSQL_AUDIT_GENERAL_CLASS 0
|
||||||
@@ -49,6 +51,7 @@ struct mysql_event
|
|||||||
#define MYSQL_AUDIT_GENERAL_LOG 0
|
#define MYSQL_AUDIT_GENERAL_LOG 0
|
||||||
#define MYSQL_AUDIT_GENERAL_ERROR 1
|
#define MYSQL_AUDIT_GENERAL_ERROR 1
|
||||||
#define MYSQL_AUDIT_GENERAL_RESULT 2
|
#define MYSQL_AUDIT_GENERAL_RESULT 2
|
||||||
|
#define MYSQL_AUDIT_GENERAL_STATUS 3
|
||||||
|
|
||||||
struct mysql_event_general
|
struct mysql_event_general
|
||||||
{
|
{
|
||||||
@@ -68,6 +71,43 @@ struct mysql_event_general
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
AUDIT CLASS : CONNECTION
|
||||||
|
|
||||||
|
CONNECT occurs after authentication phase is completed.
|
||||||
|
DISCONNECT occurs after connection is terminated.
|
||||||
|
CHANGE_USER occurs after COM_CHANGE_USER RPC is completed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CLASS 1
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CLASSMASK (1 << MYSQL_AUDIT_CONNECTION_CLASS)
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CONNECT 0
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_DISCONNECT 1
|
||||||
|
#define MYSQL_AUDIT_CONNECTION_CHANGE_USER 2
|
||||||
|
|
||||||
|
struct mysql_event_connection
|
||||||
|
{
|
||||||
|
unsigned int event_class;
|
||||||
|
unsigned int event_subclass;
|
||||||
|
int status;
|
||||||
|
unsigned long thread_id;
|
||||||
|
const char *user;
|
||||||
|
unsigned int user_length;
|
||||||
|
const char *priv_user;
|
||||||
|
unsigned int priv_user_length;
|
||||||
|
const char *external_user;
|
||||||
|
unsigned int external_user_length;
|
||||||
|
const char *proxy_user;
|
||||||
|
unsigned int proxy_user_length;
|
||||||
|
const char *host;
|
||||||
|
unsigned int host_length;
|
||||||
|
const char *ip;
|
||||||
|
unsigned int ip_length;
|
||||||
|
const char *database;
|
||||||
|
unsigned int database_length;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Here we define the descriptor structure, that is referred from
|
Here we define the descriptor structure, that is referred from
|
||||||
st_mysql_plugin.
|
st_mysql_plugin.
|
||||||
|
@@ -208,6 +208,27 @@ struct mysql_event_general
|
|||||||
unsigned long long general_time;
|
unsigned long long general_time;
|
||||||
unsigned long long general_rows;
|
unsigned long long general_rows;
|
||||||
};
|
};
|
||||||
|
struct mysql_event_connection
|
||||||
|
{
|
||||||
|
unsigned int event_class;
|
||||||
|
unsigned int event_subclass;
|
||||||
|
int status;
|
||||||
|
unsigned long thread_id;
|
||||||
|
const char *user;
|
||||||
|
unsigned int user_length;
|
||||||
|
const char *priv_user;
|
||||||
|
unsigned int priv_user_length;
|
||||||
|
const char *external_user;
|
||||||
|
unsigned int external_user_length;
|
||||||
|
const char *proxy_user;
|
||||||
|
unsigned int proxy_user_length;
|
||||||
|
const char *host;
|
||||||
|
unsigned int host_length;
|
||||||
|
const char *ip;
|
||||||
|
unsigned int ip_length;
|
||||||
|
const char *database;
|
||||||
|
unsigned int database_length;
|
||||||
|
};
|
||||||
struct st_mysql_audit
|
struct st_mysql_audit
|
||||||
{
|
{
|
||||||
int interface_version;
|
int interface_version;
|
||||||
|
@@ -16,6 +16,8 @@
|
|||||||
#ifndef MYSQL_FILE_H
|
#ifndef MYSQL_FILE_H
|
||||||
#define MYSQL_FILE_H
|
#define MYSQL_FILE_H
|
||||||
|
|
||||||
|
#include <my_global.h>
|
||||||
|
|
||||||
/* For strlen() */
|
/* For strlen() */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
/* For MY_STAT */
|
/* For MY_STAT */
|
||||||
|
@@ -9,6 +9,7 @@ funcs_1.myisam_views @solaris # Bug#50595 2010-03-05 alik funcs_1.myi
|
|||||||
innodb.innodb_information_schema # Bug#48883 2010-05-11 alik Test "innodb_information_schema" takes fewer locks than expected
|
innodb.innodb_information_schema # Bug#48883 2010-05-11 alik Test "innodb_information_schema" takes fewer locks than expected
|
||||||
|
|
||||||
main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
|
main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
|
||||||
|
main.gis # Bug#52208 2010-11-24 alik gis fails on some platforms (Solaris, HP-UX, Linux)
|
||||||
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||||
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
|
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
|
||||||
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
||||||
@@ -16,6 +17,7 @@ main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_m
|
|||||||
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
|
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
|
||||||
main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
|
main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
|
||||||
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
||||||
|
main.show_check # Bug#58414 2010-11-24 alik Race condition in show_check.test
|
||||||
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||||
@@ -26,64 +28,16 @@ rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails spora
|
|||||||
rpl.rpl_innodb_bug28430* # Bug#46029
|
rpl.rpl_innodb_bug28430* # Bug#46029
|
||||||
|
|
||||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
|
sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test "plugin_dir_basic" does not support RPM build (test) directory structure
|
||||||
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
|
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
|
||||||
sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails
|
sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails
|
||||||
|
|
||||||
# Declare all NDB-tests in ndb and rpl_ndb test suites experimental.
|
# BUG #59055 : All ndb tests should be removed from the repository
|
||||||
# Usually the test cases from ndb and rpl_ndb test suites are not run in PB,
|
# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests
|
||||||
# but they run by gcov.
|
|
||||||
#
|
|
||||||
|
|
||||||
ndb.*
|
|
||||||
rpl_ndb.*
|
|
||||||
rpl_ndb.rpl_ndb_log # Bug#38998
|
|
||||||
|
|
||||||
# Declare all NDB-tests in other test suites experimental.
|
|
||||||
|
|
||||||
stress.ddl_ndb
|
|
||||||
|
|
||||||
sys_vars.ndb_log_update_as_write_basic
|
sys_vars.ndb_log_update_as_write_basic
|
||||||
sys_vars.have_ndbcluster_basic
|
sys_vars.have_ndbcluster_basic
|
||||||
sys_vars.ndb_log_updated_only_basic
|
sys_vars.ndb_log_updated_only_basic
|
||||||
|
|
||||||
funcs_1.ndb_storedproc_10
|
|
||||||
funcs_1.ndb_bitdata
|
|
||||||
funcs_1.ndb_trig_03
|
|
||||||
funcs_1.ndb_trig_0102
|
|
||||||
funcs_1.is_tables_ndb
|
|
||||||
funcs_1.is_columns_ndb
|
|
||||||
funcs_1.ndb_trig_0407
|
|
||||||
funcs_1.ndb_trig_1011ext
|
|
||||||
funcs_1.ndb_storedproc_06
|
|
||||||
funcs_1.ndb_views
|
|
||||||
funcs_1.is_cml_ndb
|
|
||||||
funcs_1.ndb_storedproc_02
|
|
||||||
funcs_1.ndb_storedproc_03
|
|
||||||
funcs_1.ndb_trig_03e
|
|
||||||
funcs_1.is_engines_ndb
|
|
||||||
funcs_1.ndb_trig_08
|
|
||||||
funcs_1.ndb_storedproc_07
|
|
||||||
funcs_1.ndb_storedproc_08
|
|
||||||
funcs_1.ndb_func_view
|
|
||||||
funcs_1.ndb_trig_09
|
|
||||||
funcs_1.ndb_cursors
|
|
||||||
|
|
||||||
funcs_2.ndb_charset
|
|
||||||
|
|
||||||
parts.ndb_dd_backuprestore # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.part_supported_sql_func_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_alter1_1_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_alter1_1_2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_alter1_2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_auto_increment_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_basic_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_engine_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_int_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_mgm_lc0_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
|
||||||
main.gis-rtree # svoj: due to BUG#38965
|
main.gis-rtree # svoj: due to BUG#38965
|
||||||
main.type_float # svoj: due to BUG#38965
|
main.type_float # svoj: due to BUG#38965
|
||||||
main.type_newdecimal # svoj: due to BUG#38965
|
main.type_newdecimal # svoj: due to BUG#38965
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=1st --experimental=collections/default.experimental 1st
|
perl mysql-test-run.pl --timer --force --parallel=auto --comment=1st --experimental=collections/default.experimental 1st
|
||||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 large_tests.alter_table main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb rpl_ndb.rpl_truncate_7ndb_2
|
perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb
|
||||||
|
@@ -9,10 +9,6 @@
|
|||||||
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
|
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
|
||||||
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986).
|
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986).
|
||||||
####################################
|
####################################
|
||||||
# Change Author: JBM
|
|
||||||
# Change Date: 2006-01-11
|
|
||||||
# Change: Split test per lars review
|
|
||||||
####################################
|
|
||||||
#"REQUIREMENT: A master DROP TABLE on a table with non-existing MYI
|
#"REQUIREMENT: A master DROP TABLE on a table with non-existing MYI
|
||||||
# file must be correctly replicated to the slave"
|
# file must be correctly replicated to the slave"
|
||||||
####################################
|
####################################
|
||||||
@@ -23,8 +19,5 @@ flush tables;
|
|||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
remove_file $MYSQLD_DATADIR/test/t1.MYI ;
|
remove_file $MYSQLD_DATADIR/test/t1.MYI ;
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
save_master_pos;
|
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
--source include/rpl_end.inc
|
||||||
|
@@ -1,14 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Test of auto_increment with offset
|
# Test of auto_increment with offset
|
||||||
#
|
#
|
||||||
#####################################
|
|
||||||
# By: JBM
|
|
||||||
# Date: 2006-02-10
|
|
||||||
# Change: NDB does not support auto inc
|
|
||||||
# in this usage. Currently there is no
|
|
||||||
# plan to implment. Skipping test when
|
|
||||||
# NDB is default engine.
|
|
||||||
#####################################
|
|
||||||
-- source include/not_ndb_default.inc
|
-- source include/not_ndb_default.inc
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
|
|
||||||
@@ -169,7 +161,7 @@ drop table t1;
|
|||||||
# auto_increment fields if the values of them are 0. There is an inconsistency
|
# auto_increment fields if the values of them are 0. There is an inconsistency
|
||||||
# between slave and master. When MODE_NO_AUTO_VALUE_ON_ZERO are masters treat
|
# between slave and master. When MODE_NO_AUTO_VALUE_ON_ZERO are masters treat
|
||||||
#
|
#
|
||||||
source include/master-slave-reset.inc;
|
source include/rpl_reset.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
@@ -210,12 +202,10 @@ INSERT INTO t2 VALUES(4);
|
|||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1= master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2= slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
let $diff_table_1= master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2= slave:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@@ -228,16 +218,42 @@ let $MYSQLD_DATADIR= `SELECT @@DATADIR`;
|
|||||||
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL test
|
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL test
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1= master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2= slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
let $diff_table_1= master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2= slave:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
# End cleanup
|
# End cleanup
|
||||||
|
--connection master
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
SET SQL_MODE='';
|
SET SQL_MODE='';
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#56662
|
||||||
|
# The test verifies if the assertion of "next_insert_id == 0"
|
||||||
|
# will fail in ha_external_lock() function.
|
||||||
|
#
|
||||||
|
connection master;
|
||||||
|
CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb;
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
--echo # Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing
|
||||||
|
--echo # zero to fill the auto_increment field.
|
||||||
|
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||||
|
INSERT INTO t1(id,data) VALUES(0,2);
|
||||||
|
--echo # Resetting sql_mode without NO_AUTO_VALUE_ON_ZERO to
|
||||||
|
--echo # affect the execution of the transaction on slave.
|
||||||
|
SET SQL_MODE=0;
|
||||||
|
COMMIT;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
sync_slave_with_master;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP TABLE t1;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -29,8 +29,7 @@ commit;
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo #Test if the results are consistent on master and slave
|
--echo #Test if the results are consistent on master and slave
|
||||||
--echo #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS'
|
--echo #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS'
|
||||||
let $diff_table_1=master:test.t3;
|
let $diff_tables= master:t3, slave:t3;
|
||||||
let $diff_table_2=slave:test.t3;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
@@ -60,14 +60,11 @@ connection master;
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo #Test if the results are consistent on master and slave
|
--echo #Test if the results are consistent on master and slave
|
||||||
--echo #for 'INVOKES A TRIGGER with $trigger_action action'
|
--echo #for 'INVOKES A TRIGGER with $trigger_action action'
|
||||||
let $diff_table_1=master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2=slave:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
let $diff_table_1=master:test.t4;
|
let $diff_tables= master:t4, slave:t4;
|
||||||
let $diff_table_2=slave:test.t4;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
let $diff_table_1=master:test.t6;
|
let $diff_tables= master:t6, slave:t6;
|
||||||
let $diff_table_2=slave:test.t6;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
@@ -41,11 +41,9 @@ connection master;
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo #Test if the results are consistent on master and slave
|
--echo #Test if the results are consistent on master and slave
|
||||||
--echo #for 'CALLS A FUNCTION which INVOKES A TRIGGER with $insert_action action'
|
--echo #for 'CALLS A FUNCTION which INVOKES A TRIGGER with $insert_action action'
|
||||||
let $diff_table_1=master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2=slave:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
let $diff_table_1=master:test.t3;
|
let $diff_tables= master:t3, slave:t3;
|
||||||
let $diff_table_2=slave:test.t3;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
@@ -62,6 +62,7 @@ eval INSERT INTO t2 (a, data) VALUES (2,
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
# Incident event
|
# Incident event
|
||||||
|
# 1590=ER_SLAVE_INCIDENT
|
||||||
--let $slave_sql_errno= 1590
|
--let $slave_sql_errno= 1590
|
||||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
|
|
||||||
@@ -81,15 +82,13 @@ eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data),
|
|||||||
t1.data = CONCAT($data, $data, $data, $data);
|
t1.data = CONCAT($data, $data, $data, $data);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
# Incident event
|
# 1590=ER_SLAVE_INCIDENT
|
||||||
--let $slave_skip_counter=1
|
|
||||||
if (`SELECT @@binlog_format = 'ROW'`)
|
|
||||||
{
|
|
||||||
--inc $slave_skip_counter
|
|
||||||
}
|
|
||||||
--let $slave_sql_errno= 1590
|
--let $slave_sql_errno= 1590
|
||||||
|
--let $slave_skip_counter= `SELECT IF(@@binlog_format = 'ROW', 2, 1)`
|
||||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
--let $slave_skip_counter=
|
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # 2 - BEGIN - IMPLICIT COMMIT by DDL
|
--echo # 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||||
@@ -177,8 +176,9 @@ BEGIN;
|
|||||||
CREATE TABLE t5 (a int);
|
CREATE TABLE t5 (a int);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
--sync_slave_with_master
|
||||||
--source include/diff_master_slave.inc
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # 3 - BEGIN - COMMIT
|
--echo # 3 - BEGIN - COMMIT
|
||||||
@@ -206,8 +206,9 @@ BEGIN;
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
--sync_slave_with_master
|
||||||
--source include/diff_master_slave.inc
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # 4 - BEGIN - ROLLBACK
|
--echo # 4 - BEGIN - ROLLBACK
|
||||||
@@ -235,8 +236,9 @@ BEGIN;
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
--sync_slave_with_master
|
||||||
--source include/diff_master_slave.inc
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # 5 - PROCEDURE
|
--echo # 5 - PROCEDURE
|
||||||
@@ -284,8 +286,9 @@ eval CALL p1($data);
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
--sync_slave_with_master
|
||||||
--source include/diff_master_slave.inc
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # 6 - XID
|
--echo # 6 - XID
|
||||||
@@ -315,8 +318,9 @@ SAVEPOINT sv;
|
|||||||
ROLLBACK TO sv;
|
ROLLBACK TO sv;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
--sync_slave_with_master
|
||||||
--source include/diff_master_slave.inc
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # 7 - NON-TRANS TABLE
|
--echo # 7 - NON-TRANS TABLE
|
||||||
@@ -358,8 +362,9 @@ BEGIN;
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
--sync_slave_with_master
|
||||||
--source include/diff_master_slave.inc
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ########################################################################
|
--echo ########################################################################
|
||||||
--echo # 8 - Bug#55375(Regression Bug) Transaction bigger than
|
--echo # 8 - Bug#55375(Regression Bug) Transaction bigger than
|
||||||
@@ -409,7 +414,7 @@ while ($n)
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
connection slave;
|
--connection slave
|
||||||
--let $slave_sql_errno= 1197
|
--let $slave_sql_errno= 1197
|
||||||
if (`SELECT @@binlog_format = 'ROW'`)
|
if (`SELECT @@binlog_format = 'ROW'`)
|
||||||
{
|
{
|
||||||
@@ -444,8 +449,10 @@ connection master;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
|
# t4 exists only if binlog_format!=row, so so a warning is generated
|
||||||
|
# if binog_format=row
|
||||||
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS t4;
|
DROP TABLE IF EXISTS t4;
|
||||||
DROP TABLE IF EXISTS t5;
|
--enable_warnings
|
||||||
DROP TABLE IF EXISTS t6;
|
DROP TABLE t5;
|
||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
source include/master-slave-end.inc;
|
|
||||||
|
@@ -2,11 +2,7 @@
|
|||||||
# This test will fail if the server/client does not support enough charsets.
|
# This test will fail if the server/client does not support enough charsets.
|
||||||
|
|
||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
--disable_warnings
|
|
||||||
set timestamp=1000000000;
|
set timestamp=1000000000;
|
||||||
drop database if exists mysqltest2;
|
|
||||||
drop database if exists mysqltest3;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
create database mysqltest2 character set latin2;
|
create database mysqltest2 character set latin2;
|
||||||
set @@character_set_server=latin5;
|
set @@character_set_server=latin5;
|
||||||
@@ -149,6 +145,6 @@ eval create table `t1` (
|
|||||||
set @p=_latin1 'test';
|
set @p=_latin1 'test';
|
||||||
update t1 set pk='test' where pk=@p;
|
update t1 set pk='test' where pk=@p;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
sync_slave_with_master;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -1,16 +1,10 @@
|
|||||||
#################################
|
|
||||||
# Test updated to use a wrapper #
|
|
||||||
#################################
|
|
||||||
|
|
||||||
eval CREATE TABLE t1 (a INT) ENGINE=$engine_type;
|
eval CREATE TABLE t1 (a INT) ENGINE=$engine_type;
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
insert into t1 values(1);
|
insert into t1 values(1);
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
commit;
|
commit;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
# cleanup
|
# cleanup
|
||||||
connection master;
|
connection master;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
|
@@ -91,11 +91,13 @@ if (`SELECT @@global.binlog_format != 'ROW' OR @@global.slave_exec_mode = 'STRIC
|
|||||||
# key error, and stops the SQL thread.
|
# key error, and stops the SQL thread.
|
||||||
let $slave_sql_errno= 1062; # ER_DUP_ENTRY
|
let $slave_sql_errno= 1062; # ER_DUP_ENTRY
|
||||||
source include/wait_for_slave_sql_error.inc;
|
source include/wait_for_slave_sql_error.inc;
|
||||||
let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
|
||||||
|
--let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1)
|
||||||
--replace_regex /end_log_pos [0-9]+/end_log_pos END_LOG_POS/
|
--replace_regex /end_log_pos [0-9]+/end_log_pos END_LOG_POS/
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)'
|
--eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)'
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
|
||||||
--echo ---- Resolve the conflict on the slave and restart SQL thread ----
|
--echo ---- Resolve the conflict on the slave and restart SQL thread ----
|
||||||
@@ -142,8 +144,13 @@ if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRIC
|
|||||||
--echo ---- Wait until slave stops with an error ----
|
--echo ---- Wait until slave stops with an error ----
|
||||||
let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND
|
let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND
|
||||||
source include/wait_for_slave_sql_error.inc;
|
source include/wait_for_slave_sql_error.inc;
|
||||||
let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
|
||||||
--echo Last_SQL_Error = $err (expected "can't find record" error)
|
--let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1)
|
||||||
|
--replace_regex /end_log_pos [0-9]+/end_log_pos END_LOG_POS/
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)'
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
|
||||||
--echo ---- Resolve the conflict on the slave and restart SQL thread ----
|
--echo ---- Resolve the conflict on the slave and restart SQL thread ----
|
||||||
@@ -168,4 +175,4 @@ connection master;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo [on slave]
|
--echo [on slave]
|
||||||
sync_slave_with_master;
|
--sync_slave_with_master
|
||||||
|
@@ -136,14 +136,6 @@ sync_slave_with_master;
|
|||||||
connection master;
|
connection master;
|
||||||
SET AUTOCOMMIT = 1;
|
SET AUTOCOMMIT = 1;
|
||||||
#
|
#
|
||||||
# 1. DROP all objects, which probably already exist, but must be created here
|
|
||||||
#
|
|
||||||
--disable_warnings
|
|
||||||
DROP DATABASE IF EXISTS mysqltest1;
|
|
||||||
DROP DATABASE IF EXISTS mysqltest2;
|
|
||||||
DROP DATABASE IF EXISTS mysqltest3;
|
|
||||||
--enable_warnings
|
|
||||||
#
|
|
||||||
# 2. CREATE all objects needed
|
# 2. CREATE all objects needed
|
||||||
# working database is mysqltest1
|
# working database is mysqltest1
|
||||||
# working table (transactional!) is mysqltest1.t1
|
# working table (transactional!) is mysqltest1.t1
|
||||||
@@ -619,6 +611,3 @@ connection master;
|
|||||||
DROP DATABASE mysqltest1;
|
DROP DATABASE mysqltest1;
|
||||||
# mysqltest2 was alreday DROPPED some tests before.
|
# mysqltest2 was alreday DROPPED some tests before.
|
||||||
DROP DATABASE mysqltest3;
|
DROP DATABASE mysqltest3;
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
-- source include/master-slave-end.inc
|
|
||||||
|
@@ -131,3 +131,4 @@ sync_slave_with_master;
|
|||||||
SET global max_relay_log_size= @my_max_relay_log_size;
|
SET global max_relay_log_size= @my_max_relay_log_size;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -1,24 +1,7 @@
|
|||||||
#############################################################
|
#############################################################
|
||||||
# Author: Chuck
|
|
||||||
#############################################################
|
|
||||||
# Purpose: To test having extra columns on the master WL#3915
|
# Purpose: To test having extra columns on the master WL#3915
|
||||||
# engine inspecific sourced part
|
# engine inspecific sourced part
|
||||||
#############################################################
|
#############################################################
|
||||||
# Change Author: Jeb
|
|
||||||
# Change: Cleanup and extend testing
|
|
||||||
#############################################################
|
|
||||||
# TODO: partition specific
|
|
||||||
# -- source include/have_partition.inc
|
|
||||||
# Note: Will be done in different test due to NDB using this
|
|
||||||
# test case.
|
|
||||||
############################################################
|
|
||||||
|
|
||||||
########### Clean up ################
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t10,t11,t12,t13,t14,t15,t16,t17,t18,t31;
|
|
||||||
--enable_query_log
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Setup differently defined tables on master and slave
|
# Setup differently defined tables on master and slave
|
||||||
@@ -1025,8 +1008,3 @@ SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
|
|||||||
connection master;
|
connection master;
|
||||||
DROP TABLE t5;
|
DROP TABLE t5;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo
|
|
||||||
|
|
||||||
# END of 5.1 tests case
|
|
||||||
|
|
||||||
|
|
@@ -1,19 +1,10 @@
|
|||||||
#################################################
|
#################################################
|
||||||
# Author: Jeb
|
|
||||||
# Date: 2006-09-07
|
|
||||||
# Purpose: To test having extra columns on the slave.
|
# Purpose: To test having extra columns on the slave.
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
# Some tests in here requre partitioning
|
# Some tests in here requre partitioning
|
||||||
-- source include/have_partition.inc
|
-- source include/have_partition.inc
|
||||||
|
|
||||||
########### Clean up ################
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
|
|
||||||
--enable_query_log
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
############ Different Table Def Test ###########
|
############ Different Table Def Test ###########
|
||||||
#################################################
|
#################################################
|
||||||
@@ -286,16 +277,14 @@ connection slave;
|
|||||||
--let $slave_sql_errno= 1677
|
--let $slave_sql_errno= 1677
|
||||||
--let $show_slave_sql_error= 1
|
--let $show_slave_sql_error= 1
|
||||||
--source include/wait_for_slave_sql_error.inc
|
--source include/wait_for_slave_sql_error.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
|
||||||
#START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t6 ***
|
--echo *** Drop t6 ***
|
||||||
|
--let $rpl_only_running_threads= 1
|
||||||
|
--source include/rpl_reset.inc
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
DROP TABLE t6;
|
DROP TABLE t6;
|
||||||
connection slave;
|
--sync_slave_with_master
|
||||||
DROP TABLE t6;
|
|
||||||
START SLAVE;
|
|
||||||
#sync_slave_with_master;
|
|
||||||
|
|
||||||
|
|
||||||
--echo **** Diff Table Def End ****
|
--echo **** Diff Table Def End ****
|
||||||
@@ -453,9 +442,9 @@ if ($engine_type != NDB)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#--echo *** Drop t9 ***
|
#--echo *** Drop t9 ***
|
||||||
#connection master;
|
connection master;
|
||||||
#DROP TABLE t9;
|
DROP TABLE t9;
|
||||||
#sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# More columns in slave at middle of table #
|
# More columns in slave at middle of table #
|
||||||
@@ -730,6 +719,10 @@ sync_slave_with_master;
|
|||||||
--replace_column 5 CURRENT_TIMESTAMP
|
--replace_column 5 CURRENT_TIMESTAMP
|
||||||
SELECT * FROM t14a ORDER BY c1;
|
SELECT * FROM t14a ORDER BY c1;
|
||||||
|
|
||||||
|
--connection master
|
||||||
|
DROP TABLE t14a;
|
||||||
|
--sync_slave_with_master
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
# - Alter Master Dropping columns from the middle. #
|
# - Alter Master Dropping columns from the middle. #
|
||||||
# Expect: columns dropped #
|
# Expect: columns dropped #
|
||||||
@@ -917,17 +910,3 @@ connection slave;
|
|||||||
connection master;
|
connection master;
|
||||||
DROP TABLE t17;
|
DROP TABLE t17;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
#### Clean Up ####
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
connection master;
|
|
||||||
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
|
|
||||||
sync_slave_with_master;
|
|
||||||
connection master;
|
|
||||||
--enable_query_log
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
# END 5.1 Test Case
|
|
||||||
|
|
||||||
|
|
@@ -22,4 +22,5 @@ connection master;
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
commit;
|
commit;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
-- sync_slave_with_master
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -54,7 +54,6 @@ unlock tables;
|
|||||||
connection master;
|
connection master;
|
||||||
drop table t3, t4, t5;
|
drop table t3, t4, t5;
|
||||||
|
|
||||||
sync_slave_with_master;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -59,6 +59,4 @@ select count(*) from t1 /* must be zero */;
|
|||||||
connection master;
|
connection master;
|
||||||
drop table t2,t1;
|
drop table t2,t1;
|
||||||
|
|
||||||
sync_slave_with_master;
|
--source include/rpl_end.inc
|
||||||
|
|
||||||
|
|
||||||
|
@@ -40,26 +40,16 @@ if (!$debug_sync_action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Restart slave
|
# Restart slave
|
||||||
--disable_warnings
|
--source include/stop_slave.inc
|
||||||
stop slave;
|
|
||||||
source include/wait_for_slave_to_stop.inc;
|
|
||||||
|
|
||||||
eval SET @@global.debug= "+d,$dbug_sync_point";
|
eval SET @@global.debug= "+d,$dbug_sync_point";
|
||||||
|
|
||||||
start slave;
|
--source include/start_slave.inc
|
||||||
source include/wait_for_slave_to_start.inc;
|
|
||||||
--echo slave is going to hang in get_master_version_and_clock
|
--echo slave is going to hang in get_master_version_and_clock
|
||||||
|
|
||||||
connection master;
|
--let $rpl_server_number= 1
|
||||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
--source include/rpl_stop_server.inc
|
||||||
# it until it's told to
|
|
||||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
||||||
|
|
||||||
# Send shutdown to the connected server and give
|
|
||||||
# it 10 seconds to die before zapping it
|
|
||||||
shutdown_server 10;
|
|
||||||
|
|
||||||
connection slave;
|
|
||||||
--echo slave is unblocked
|
--echo slave is unblocked
|
||||||
|
|
||||||
eval SET DEBUG_SYNC=$debug_sync_action;
|
eval SET DEBUG_SYNC=$debug_sync_action;
|
||||||
@@ -74,6 +64,7 @@ connection slave;
|
|||||||
# '1040' ER_CON_COUNT_ERROR
|
# '1040' ER_CON_COUNT_ERROR
|
||||||
# '1053' ER_SERVER_SHUTDOWN
|
# '1053' ER_SERVER_SHUTDOWN
|
||||||
let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013;
|
let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013;
|
||||||
|
--let $slave_io_error_is_nonfatal= 1
|
||||||
source include/wait_for_slave_io_error.inc;
|
source include/wait_for_slave_io_error.inc;
|
||||||
|
|
||||||
# deactivate the sync point of get_master_version_and_clock()
|
# deactivate the sync point of get_master_version_and_clock()
|
||||||
@@ -82,19 +73,12 @@ source include/wait_for_slave_io_error.inc;
|
|||||||
# unset.
|
# unset.
|
||||||
eval set @@global.debug = "-d,$dbug_sync_point";
|
eval set @@global.debug = "-d,$dbug_sync_point";
|
||||||
|
|
||||||
# Write file to make mysql-test-run.pl start up the server again
|
--let $rpl_server_number= 1
|
||||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--source include/rpl_start_server.inc
|
||||||
|
|
||||||
connection master;
|
|
||||||
# Turn on reconnect
|
|
||||||
--enable_reconnect
|
|
||||||
|
|
||||||
# Call script that will poll the server waiting for it to be back online again
|
|
||||||
--source include/wait_until_connected_again.inc
|
|
||||||
|
|
||||||
# Turn off reconnect again
|
|
||||||
--disable_reconnect
|
|
||||||
|
|
||||||
connection slave;
|
|
||||||
source include/wait_for_slave_to_start.inc;
|
|
||||||
|
|
||||||
|
# We don't source include/wait_for_slave_io_to_start.inc, because the
|
||||||
|
# IO thread has an error and wait_for_slave_io_to_start.inc fails if
|
||||||
|
# the IO thread has an error.
|
||||||
|
--let $slave_param= Slave_IO_Running
|
||||||
|
--let $slave_param_value= Yes
|
||||||
|
--source include/wait_for_slave_param.inc
|
||||||
|
@@ -649,8 +649,7 @@ SET AUTOCOMMIT= 1;
|
|||||||
--echo ###################################################################################
|
--echo ###################################################################################
|
||||||
--sync_slave_with_master
|
--sync_slave_with_master
|
||||||
|
|
||||||
--let $diff_table_1= master:test.tt_1
|
--let $diff_tables= master:tt_1,slave:tt_1
|
||||||
--let $diff_table_2= slave:test.tt_1
|
|
||||||
--source include/diff_tables.inc
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
--echo ###################################################################################
|
--echo ###################################################################################
|
||||||
|
@@ -180,5 +180,3 @@ DROP TABLE t1;
|
|||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
|
|
||||||
--echo End of 6.0 tests
|
--echo End of 6.0 tests
|
||||||
|
|
||||||
--source include/master-slave-end.inc
|
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
###########################################################
|
###########################################################
|
||||||
# 2006-02-01: By JBM: Added 1022, ORDER BY
|
|
||||||
###########################################################
|
|
||||||
# See if queries that use both auto_increment and LAST_INSERT_ID()
|
# See if queries that use both auto_increment and LAST_INSERT_ID()
|
||||||
# are replicated well
|
# are replicated well
|
||||||
############################################################
|
############################################################
|
||||||
@@ -9,17 +7,10 @@
|
|||||||
# column and index but without primary key.
|
# column and index but without primary key.
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Setup
|
--echo # Setup
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
use test;
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1, t2, t3;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # See if queries that use both auto_increment and LAST_INSERT_ID()
|
--echo # See if queries that use both auto_increment and LAST_INSERT_ID()
|
||||||
--echo # are replicated well
|
--echo # are replicated well
|
||||||
@@ -30,6 +21,13 @@ drop table if exists t1, t2, t3;
|
|||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
#should work for both SBR and RBR
|
#should work for both SBR and RBR
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
--connection slave
|
||||||
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
# If concurrent inserts are on, it is not guaranteed that the rows
|
# If concurrent inserts are on, it is not guaranteed that the rows
|
||||||
# inserted by INSERT are immediately accessible by SELECT in another
|
# inserted by INSERT are immediately accessible by SELECT in another
|
||||||
# thread. This would cause problems near the line 'connection master1'
|
# thread. This would cause problems near the line 'connection master1'
|
||||||
@@ -44,9 +42,7 @@ eval create table t2(b int auto_increment, c int, key(b)) engine=$engine_type;
|
|||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
insert into t1 values (null);
|
insert into t1 values (null);
|
||||||
insert into t2 values (null,last_insert_id());
|
insert into t2 values (null,last_insert_id());
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1 ORDER BY a;
|
select * from t1 ORDER BY a;
|
||||||
select * from t2 ORDER BY b;
|
select * from t2 ORDER BY b;
|
||||||
connection master;
|
connection master;
|
||||||
@@ -65,9 +61,7 @@ insert into t1 values (null),(null),(null);
|
|||||||
insert into t2 values (5,0);
|
insert into t2 values (5,0);
|
||||||
insert into t2 values (null,last_insert_id());
|
insert into t2 values (null,last_insert_id());
|
||||||
SET FOREIGN_KEY_CHECKS=1;
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1;
|
select * from t1;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
connection master;
|
connection master;
|
||||||
@@ -85,17 +79,13 @@ insert into t1 values (null),(null),(null);
|
|||||||
insert into t2 values (5,0);
|
insert into t2 values (5,0);
|
||||||
insert into t2 (c) select * from t1 ORDER BY a;
|
insert into t2 (c) select * from t1 ORDER BY a;
|
||||||
select * from t2 ORDER BY b;
|
select * from t2 ORDER BY b;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1 ORDER BY a;
|
select * from t1 ORDER BY a;
|
||||||
select * from t2 ORDER BY b;
|
select * from t2 ORDER BY b;
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#8412: Error codes reported in binary log for CHARACTER SET,
|
--echo # Bug#8412: Error codes reported in binary log for CHARACTER SET,
|
||||||
@@ -215,9 +205,7 @@ call foo();
|
|||||||
|
|
||||||
select * from t1;
|
select * from t1;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1;
|
select * from t1;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
connection master;
|
connection master;
|
||||||
@@ -562,4 +550,5 @@ drop table t1, t2;
|
|||||||
drop procedure foo;
|
drop procedure foo;
|
||||||
SET @@global.concurrent_insert= @old_concurrent_insert;
|
SET @@global.concurrent_insert= @old_concurrent_insert;
|
||||||
set @@session.sql_auto_is_null=default;
|
set @@session.sql_auto_is_null=default;
|
||||||
sync_slave_with_master;
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
###########################################################
|
###########################################################
|
||||||
# 2006-02-08: By JBM:
|
|
||||||
###########################################################
|
|
||||||
# See if queries that use both auto_increment and LAST_INSERT_ID()
|
# See if queries that use both auto_increment and LAST_INSERT_ID()
|
||||||
# are replicated well
|
# are replicated well
|
||||||
############################################################
|
############################################################
|
||||||
@@ -14,15 +12,12 @@
|
|||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
#should work for both SBR and RBR
|
#should work for both SBR and RBR
|
||||||
|
|
||||||
connection master;
|
|
||||||
create table t1(a int auto_increment, primary key(a));
|
create table t1(a int auto_increment, primary key(a));
|
||||||
create table t2(b int auto_increment, c int, primary key(b));
|
create table t2(b int auto_increment, c int, primary key(b));
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
insert into t1 values (null);
|
insert into t1 values (null);
|
||||||
insert into t2 values (null,last_insert_id());
|
insert into t2 values (null,last_insert_id());
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1 ORDER BY a;
|
select * from t1 ORDER BY a;
|
||||||
select * from t2 ORDER BY b;
|
select * from t2 ORDER BY b;
|
||||||
connection master;
|
connection master;
|
||||||
@@ -41,9 +36,7 @@ insert into t1 values (null),(null),(null);
|
|||||||
insert into t2 values (5,0);
|
insert into t2 values (5,0);
|
||||||
insert into t2 values (null,last_insert_id());
|
insert into t2 values (null,last_insert_id());
|
||||||
SET FOREIGN_KEY_CHECKS=1;
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1;
|
select * from t1;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
connection master;
|
connection master;
|
||||||
@@ -59,17 +52,13 @@ insert into t1 values (null),(null),(null);
|
|||||||
insert into t2 values (5,0);
|
insert into t2 values (5,0);
|
||||||
insert into t2 (c) select * from t1 ORDER BY a;
|
insert into t2 (c) select * from t1 ORDER BY a;
|
||||||
select * from t2 ORDER BY b;
|
select * from t2 ORDER BY b;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1 ORDER BY a;
|
select * from t1 ORDER BY a;
|
||||||
select * from t2 ORDER BY b;
|
select * from t2 ORDER BY b;
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
|
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
|
||||||
@@ -85,5 +74,7 @@ INSERT INTO t1 VALUES (1),(1);
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
sync_slave_with_master;
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -11,13 +11,10 @@
|
|||||||
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
|
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
|
||||||
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986)
|
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986)
|
||||||
|
|
||||||
|
-- source include/have_binlog_format_statement.inc
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
source include/have_innodb.inc;
|
source include/have_innodb.inc;
|
||||||
|
|
||||||
connection slave;
|
|
||||||
reset master;
|
|
||||||
connection master;
|
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
@@ -48,9 +45,7 @@ create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60))
|
|||||||
insert into t3 select * from t2;
|
insert into t3 select * from t2;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
|
|
||||||
select * from t1;
|
select * from t1;
|
||||||
select * from t3;
|
select * from t3;
|
||||||
@@ -62,9 +57,7 @@ drop table t2;
|
|||||||
drop table t3;
|
drop table t3;
|
||||||
create table t1(a int, b int, unique(b));
|
create table t1(a int, b int, unique(b));
|
||||||
|
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
|
|
||||||
# See if slave stops when there's a duplicate entry for key error in LOAD DATA
|
# See if slave stops when there's a duplicate entry for key error in LOAD DATA
|
||||||
|
|
||||||
@@ -75,21 +68,16 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
|
|||||||
|
|
||||||
save_master_pos;
|
save_master_pos;
|
||||||
connection slave;
|
connection slave;
|
||||||
# The SQL slave thread should be stopped now.
|
# 1062 = ER_DUP_ENTRY
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1062
|
||||||
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
|
|
||||||
# Skip the bad event and see if error is cleared in SHOW SLAVE STATUS by START
|
# Skip the bad event and see if error is cleared in SHOW SLAVE STATUS by START
|
||||||
# SLAVE, even though we are not executing any event (as sql_slave_skip_counter
|
# SLAVE, even though we are not executing any event (as sql_slave_skip_counter
|
||||||
# takes us directly to the end of the relay log).
|
# takes us directly to the end of the relay log).
|
||||||
|
|
||||||
set global sql_slave_skip_counter=1;
|
|
||||||
start slave;
|
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
--source include/check_slave_no_error.inc
|
||||||
echo Last_SQL_Errno=$last_error;
|
|
||||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
|
||||||
echo Last_SQL_Error;
|
|
||||||
echo $last_error;
|
|
||||||
|
|
||||||
# Trigger error again to test CHANGE MASTER
|
# Trigger error again to test CHANGE MASTER
|
||||||
|
|
||||||
@@ -103,17 +91,15 @@ connection slave;
|
|||||||
# The SQL slave thread should be stopped now.
|
# The SQL slave thread should be stopped now.
|
||||||
# Exec_Master_Log_Pos should point to the start of Execute event
|
# Exec_Master_Log_Pos should point to the start of Execute event
|
||||||
# for last load data.
|
# for last load data.
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
# 1062 = ER_DUP_ENTRY
|
||||||
|
--let $slave_sql_errno= 1062
|
||||||
|
--source include/wait_for_slave_sql_error.inc
|
||||||
|
|
||||||
# CHANGE MASTER and see if error is cleared in SHOW SLAVE STATUS.
|
# CHANGE MASTER and see if error is cleared in SHOW SLAVE STATUS.
|
||||||
stop slave;
|
--source include/stop_slave_io.inc
|
||||||
change master to master_user='test';
|
change master to master_user='test';
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
--source include/check_slave_no_error.inc
|
||||||
echo Last_SQL_Errno=$last_error;
|
|
||||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
|
||||||
echo Last_SQL_Error;
|
|
||||||
echo $last_error;
|
|
||||||
|
|
||||||
# Trigger error again to test RESET SLAVE
|
# Trigger error again to test RESET SLAVE
|
||||||
|
|
||||||
@@ -128,16 +114,14 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
|
|||||||
save_master_pos;
|
save_master_pos;
|
||||||
connection slave;
|
connection slave;
|
||||||
# The SQL slave thread should be stopped now.
|
# The SQL slave thread should be stopped now.
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
# 1062 = ER_DUP_ENTRY
|
||||||
|
--let $slave_sql_errno= 1062
|
||||||
|
--source include/wait_for_slave_sql_error.inc
|
||||||
|
|
||||||
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
|
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
--source include/check_slave_no_error.inc
|
||||||
echo Last_SQL_Errno=$last_error;
|
|
||||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
|
||||||
echo Last_SQL_Error;
|
|
||||||
echo $last_error;
|
|
||||||
|
|
||||||
# Finally, see if logging is done ok on master for a failing LOAD DATA INFILE
|
# Finally, see if logging is done ok on master for a failing LOAD DATA INFILE
|
||||||
|
|
||||||
@@ -166,9 +150,13 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fi
|
|||||||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||||||
'\n##\n' starting by '>' ignore 1 lines;
|
'\n##\n' starting by '>' ignore 1 lines;
|
||||||
connection slave;
|
connection slave;
|
||||||
|
|
||||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
if (`SELECT @@global.binlog_format != 'ROW'`)
|
||||||
{
|
{
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
# Query causes error on master but not on slave. This causes the slave to
|
||||||
|
# stop with error code 0 (which is wrong: see BUG#57287)
|
||||||
|
--let $slave_sql_errno= 0
|
||||||
|
--source include/wait_for_slave_sql_error.inc
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
}
|
}
|
||||||
connection master;
|
connection master;
|
||||||
@@ -180,11 +168,12 @@ CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
|||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY
|
||||||
eval $UPPER_STMT_HEAD INFILE "../../std_data/words.dat" INTO TABLE t1;
|
eval $UPPER_STMT_HEAD INFILE "../../std_data/words.dat" INTO TABLE t1;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
# BUG#48297: Schema name is ignored when LOAD DATA is written into binlog,
|
# BUG#48297: Schema name is ignored when LOAD DATA is written into binlog,
|
||||||
# replication aborts
|
# replication aborts
|
||||||
-- source include/master-slave-reset.inc
|
-- let $rpl_only_running_threads= 1
|
||||||
|
-- source include/rpl_reset.inc
|
||||||
|
|
||||||
-- let $db1= b48297_db1
|
-- let $db1= b48297_db1
|
||||||
-- let $db2= b42897_db2
|
-- let $db2= b42897_db2
|
||||||
@@ -245,8 +234,7 @@ connect (conn2,localhost,root,,*NO-ONE*);
|
|||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
-- eval use $db1
|
-- eval use $db1
|
||||||
|
|
||||||
let $diff_table_1=master:$db1.t1;
|
let $diff_tables= master:$db1.t1, slave:$db1.t1;
|
||||||
let $diff_table_2=slave:$db1.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
@@ -257,7 +245,7 @@ source include/diff_tables.inc;
|
|||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
# BUG#49479: LOAD DATA INFILE is binlogged without escaping field names
|
# BUG#49479: LOAD DATA INFILE is binlogged without escaping field names
|
||||||
-- source include/master-slave-reset.inc
|
-- source include/rpl_reset.inc
|
||||||
-- connection master
|
-- connection master
|
||||||
use test;
|
use test;
|
||||||
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||||||
@@ -268,6 +256,5 @@ SELECT * FROM t1;
|
|||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
-- connection master
|
-- connection master
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
-- sync_slave_with_master
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
--source include/rpl_end.inc
|
||||||
|
@@ -126,7 +126,7 @@ DROP TABLE t3;
|
|||||||
|
|
||||||
# Reset binlog so that show binlog events will not show the tests
|
# Reset binlog so that show binlog events will not show the tests
|
||||||
# above.
|
# above.
|
||||||
source include/master-slave-reset.inc;
|
source include/rpl_reset.inc;
|
||||||
connection master;
|
connection master;
|
||||||
|
|
||||||
create table t1(a int auto_increment primary key, b int);
|
create table t1(a int auto_increment primary key, b int);
|
||||||
|
@@ -6,9 +6,6 @@
|
|||||||
# Requires statement logging
|
# Requires statement logging
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
|
|
||||||
# We have to sync with master, to ensure slave had time to start properly
|
|
||||||
# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
|
|
||||||
sync_slave_with_master;
|
|
||||||
connection slave;
|
connection slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
connection master;
|
connection master;
|
||||||
@@ -117,3 +114,4 @@ set global max_binlog_size= @my_max_binlog_size;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 4.1 tests
|
--echo # End of 4.1 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -7,9 +7,6 @@
|
|||||||
# PS doesn't support multi-statements
|
# PS doesn't support multi-statements
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
--disable_warnings
|
|
||||||
drop database if exists mysqltest;
|
|
||||||
--enable_warnings
|
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
|
|
||||||
delimiter /;
|
delimiter /;
|
||||||
@@ -25,4 +22,5 @@ select * from mysqltest.t1;
|
|||||||
connection master;
|
connection master;
|
||||||
source include/show_binlog_events.inc;
|
source include/show_binlog_events.inc;
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
sync_slave_with_master;
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -19,12 +19,11 @@ SELECT * FROM t1 ORDER BY a;
|
|||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
|
|
||||||
UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a;
|
UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
sync_slave_with_master;
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -230,7 +230,7 @@ connection master;
|
|||||||
|
|
||||||
# Reset both slave and master
|
# Reset both slave and master
|
||||||
# This should reset binlog to #1
|
# This should reset binlog to #1
|
||||||
--source include/master-slave-reset.inc
|
--source include/rpl_reset.inc
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
|
@@ -71,12 +71,10 @@ INSERT INTO t4(a) VALUES (5);
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2=slave:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
--echo TABLES t2 and t3 must be different.
|
--echo TABLES t2 and t3 must be different.
|
||||||
@@ -101,8 +99,7 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300);
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
--echo ************* CLEANING *************
|
--echo ************* CLEANING *************
|
||||||
@@ -154,8 +151,7 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00');
|
|||||||
--echo ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES *************
|
--echo ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES *************
|
||||||
--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@@ -273,7 +269,7 @@ sync_slave_with_master;
|
|||||||
# SELECT * FROM t3 ORDER BY a;
|
# SELECT * FROM t3 ORDER BY a;
|
||||||
# connection slave;
|
# connection slave;
|
||||||
# SELECT * FROM t3 ORDER BY a;
|
# SELECT * FROM t3 ORDER BY a;
|
||||||
# --source include/reset_master_and_slave.inc
|
# --source include/rpl_reset.inc
|
||||||
#
|
#
|
||||||
# connection master;
|
# connection master;
|
||||||
#
|
#
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
-- echo ## case #1 - last_null_bit_pos==0 in record_compare without X bit
|
-- echo ## case #1 - last_null_bit_pos==0 in record_compare without X bit
|
||||||
|
|
||||||
-- source include/master-slave-reset.inc
|
-- source include/rpl_reset.inc
|
||||||
-- connection master
|
-- connection master
|
||||||
|
|
||||||
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
||||||
@@ -16,8 +16,7 @@ UPDATE t1 SET c5 = 'a';
|
|||||||
-- enable_warnings
|
-- enable_warnings
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- let $diff_table_1= master:test.t1
|
-- let $diff_tables= master:t1, slave:t1
|
||||||
-- let $diff_table_2= slave:test.t1
|
|
||||||
-- source include/diff_tables.inc
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
@@ -26,7 +25,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
-- echo ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
|
-- echo ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
|
||||||
-- echo ## (1 column less and no varchar)
|
-- echo ## (1 column less and no varchar)
|
||||||
-- source include/master-slave-reset.inc
|
-- source include/rpl_reset.inc
|
||||||
-- connection master
|
-- connection master
|
||||||
|
|
||||||
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
||||||
@@ -38,8 +37,7 @@ UPDATE t1 SET c5 = 'a';
|
|||||||
-- enable_warnings
|
-- enable_warnings
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- let $diff_table_1= master:test.t1
|
-- let $diff_tables= master:t1, slave:t1
|
||||||
-- let $diff_table_2= slave:test.t1
|
|
||||||
-- source include/diff_tables.inc
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
@@ -48,7 +46,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
-- echo ## case #2 - X bit is wrongly set.
|
-- echo ## case #2 - X bit is wrongly set.
|
||||||
|
|
||||||
-- source include/master-slave-reset.inc
|
-- source include/rpl_reset.inc
|
||||||
-- connection master
|
-- connection master
|
||||||
|
|
||||||
-- eval CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=$engine DEFAULT CHARSET= latin1
|
-- eval CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=$engine DEFAULT CHARSET= latin1
|
||||||
@@ -57,8 +55,7 @@ INSERT INTO t1(c1) VALUES (NULL);
|
|||||||
UPDATE t1 SET c1= 0;
|
UPDATE t1 SET c1= 0;
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- let $diff_table_1= master:test.t1
|
-- let $diff_tables= master:t1, slave:t1
|
||||||
-- let $diff_table_2= slave:test.t1
|
|
||||||
-- source include/diff_tables.inc
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
|
@@ -55,9 +55,9 @@ source include/check_slave_no_error.inc;
|
|||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
let $slave_io_errno= 1045;
|
let $slave_io_errno= 1045;
|
||||||
source include/wait_for_slave_io_error.inc;
|
--source include/wait_for_slave_io_error.inc
|
||||||
|
--source include/stop_slave_sql.inc
|
||||||
|
|
||||||
stop slave;
|
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
source include/check_slave_no_error.inc;
|
source include/check_slave_no_error.inc;
|
||||||
@@ -70,8 +70,12 @@ stop slave;
|
|||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
let $slave_io_errno= 1045;
|
let $slave_io_errno= 1045;
|
||||||
source include/wait_for_slave_io_error.inc;
|
--source include/wait_for_slave_io_error.inc
|
||||||
|
--source include/stop_slave_sql.inc
|
||||||
|
|
||||||
stop slave;
|
|
||||||
reset slave;
|
reset slave;
|
||||||
source include/check_slave_no_error.inc;
|
source include/check_slave_no_error.inc;
|
||||||
|
change master to master_user='root';
|
||||||
|
|
||||||
|
--let $rpl_only_running_threads= 1
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -75,5 +75,3 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/r
|
|||||||
# this cleanup as no other test will use these files and they'll
|
# this cleanup as no other test will use these files and they'll
|
||||||
# be removed at next testsuite run.
|
# be removed at next testsuite run.
|
||||||
|
|
||||||
# End of 5.0 test case
|
|
||||||
-- source include/master-slave-end.inc
|
|
||||||
|
@@ -158,8 +158,8 @@ SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5
|
|||||||
#
|
#
|
||||||
|
|
||||||
if (`select char_length('$bit_field_special') > 0`) {
|
if (`select char_length('$bit_field_special') > 0`) {
|
||||||
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
|
|
||||||
connection slave;
|
connection slave;
|
||||||
|
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
|
||||||
eval SET GLOBAL SLAVE_TYPE_CONVERSIONS = '$bit_field_special';
|
eval SET GLOBAL SLAVE_TYPE_CONVERSIONS = '$bit_field_special';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ DELETE FROM t1;
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
# Just to get a clean binary log
|
# Just to get a clean binary log
|
||||||
source include/reset_master_and_slave.inc;
|
--source include/rpl_reset.inc
|
||||||
|
|
||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
connection master;
|
connection master;
|
||||||
@@ -368,8 +368,7 @@ INSERT INTO t1 VALUES (1, "", 1);
|
|||||||
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
|
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
--echo [expecting slave to replicate correctly]
|
--echo [expecting slave to replicate correctly]
|
||||||
@@ -378,20 +377,14 @@ INSERT INTO t2 VALUES (1, "", 1);
|
|||||||
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
|
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2=slave:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||||
|
|
||||||
connection master;
|
--let $rpl_only_running_threads= 1
|
||||||
RESET MASTER;
|
--source include/rpl_reset.inc
|
||||||
connection slave;
|
|
||||||
STOP SLAVE;
|
|
||||||
RESET SLAVE;
|
|
||||||
START SLAVE;
|
|
||||||
source include/wait_for_slave_to_start.inc;
|
|
||||||
|
|
||||||
--echo [expecting slave to replicate correctly]
|
--echo [expecting slave to replicate correctly]
|
||||||
connection master;
|
connection master;
|
||||||
@@ -399,8 +392,7 @@ INSERT INTO t4 VALUES (1, "", 1);
|
|||||||
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
|
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t4;
|
let $diff_tables= master:t4, slave:t4;
|
||||||
let $diff_table_2=slave:test.t4;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
--echo [expecting slave to stop]
|
--echo [expecting slave to stop]
|
||||||
@@ -413,13 +405,8 @@ connection slave;
|
|||||||
--let $slave_sql_errno= 1677
|
--let $slave_sql_errno= 1677
|
||||||
--let $show_slave_sql_error= 1
|
--let $show_slave_sql_error= 1
|
||||||
--source include/wait_for_slave_sql_error.inc
|
--source include/wait_for_slave_sql_error.inc
|
||||||
connection master;
|
|
||||||
RESET MASTER;
|
--source include/rpl_reset.inc
|
||||||
connection slave;
|
|
||||||
STOP SLAVE;
|
|
||||||
RESET SLAVE;
|
|
||||||
START SLAVE;
|
|
||||||
source include/wait_for_slave_to_start.inc;
|
|
||||||
|
|
||||||
--echo [expecting slave to stop]
|
--echo [expecting slave to stop]
|
||||||
connection master;
|
connection master;
|
||||||
@@ -431,13 +418,8 @@ connection slave;
|
|||||||
--let $slave_sql_errno= 1677
|
--let $slave_sql_errno= 1677
|
||||||
--let $show_slave_sql_error= 1
|
--let $show_slave_sql_error= 1
|
||||||
--source include/wait_for_slave_sql_error.inc
|
--source include/wait_for_slave_sql_error.inc
|
||||||
connection master;
|
|
||||||
RESET MASTER;
|
--source include/rpl_reset.inc
|
||||||
connection slave;
|
|
||||||
STOP SLAVE;
|
|
||||||
RESET SLAVE;
|
|
||||||
START SLAVE;
|
|
||||||
source include/wait_for_slave_to_start.inc;
|
|
||||||
|
|
||||||
--echo [expecting slave to replicate correctly]
|
--echo [expecting slave to replicate correctly]
|
||||||
connection master;
|
connection master;
|
||||||
@@ -445,8 +427,7 @@ INSERT INTO t7 VALUES (1, "", 1);
|
|||||||
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
|
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t7;
|
let $diff_tables= master:t7, slave:t7;
|
||||||
let $diff_table_2=slave:test.t7;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@@ -466,8 +447,7 @@ UPDATE t1 SET a = 10;
|
|||||||
INSERT INTO t1 VALUES (4);
|
INSERT INTO t1 VALUES (4);
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@@ -545,8 +525,7 @@ UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
|
|||||||
--sync_slave_with_master
|
--sync_slave_with_master
|
||||||
--echo *** results: t2 must be consistent ****
|
--echo *** results: t2 must be consistent ****
|
||||||
|
|
||||||
let $diff_table_1=master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2=master:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
@@ -584,8 +563,7 @@ UPDATE t1 SET a = 8 WHERE a < 5;
|
|||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@@ -604,8 +582,8 @@ connection master;
|
|||||||
|
|
||||||
# Since t1 contain a bit field, we have to do this trick to handle InnoDB
|
# Since t1 contain a bit field, we have to do this trick to handle InnoDB
|
||||||
if (`select char_length('$bit_field_special') > 0`) {
|
if (`select char_length('$bit_field_special') > 0`) {
|
||||||
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
|
|
||||||
connection slave;
|
connection slave;
|
||||||
|
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
|
||||||
eval SET GLOBAL SLAVE_TYPE_CONVERSIONS = '$bit_field_special';
|
eval SET GLOBAL SLAVE_TYPE_CONVERSIONS = '$bit_field_special';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -659,8 +637,7 @@ if (`select char_length('$bit_field_special') > 0`) {
|
|||||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||||
}
|
}
|
||||||
|
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
@@ -14,9 +14,8 @@ flush tables;
|
|||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
connection master;
|
|
||||||
sync_slave_with_master;
|
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
sync_slave_with_master;
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -1,9 +1,6 @@
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# This test is being created to test out the non deterministic items with #
|
# This test is being created to test out the non deterministic items with #
|
||||||
# row based replication. #
|
# row based replication. #
|
||||||
# Original Author: JBM #
|
|
||||||
# Original Date: Aug/09/2005 #
|
|
||||||
# Updated: Aug/29/2005 #
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Test: Contains two stored procedures test one that insert data into tables#
|
# Test: Contains two stored procedures test one that insert data into tables#
|
||||||
# and use the LAST_INSERTED_ID() on tables with FOREIGN KEY(a) #
|
# and use the LAST_INSERTED_ID() on tables with FOREIGN KEY(a) #
|
||||||
@@ -13,9 +10,6 @@
|
|||||||
# the table depending on the CASE outcome. The test uses this SP in a#
|
# the table depending on the CASE outcome. The test uses this SP in a#
|
||||||
# transaction first rolling back and then commiting, #
|
# transaction first rolling back and then commiting, #
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Mod Date: 08/22/2005 #
|
|
||||||
# TEST: Added test to include UPDATE CASCADE on table with FK per Trudy #
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -23,19 +17,6 @@
|
|||||||
-- source include/have_binlog_format_row.inc
|
-- source include/have_binlog_format_row.inc
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
|
|
||||||
|
|
||||||
# Begin clean up test section
|
|
||||||
connection master;
|
|
||||||
--disable_warnings
|
|
||||||
DROP PROCEDURE IF EXISTS test.p1;
|
|
||||||
DROP PROCEDURE IF EXISTS test.p2;
|
|
||||||
DROP PROCEDURE IF EXISTS test.p3;
|
|
||||||
DROP TABLE IF EXISTS test.t3;
|
|
||||||
DROP TABLE IF EXISTS test.t1;
|
|
||||||
DROP TABLE IF EXISTS test.t2;
|
|
||||||
--enable_warnings
|
|
||||||
# End of cleanup
|
|
||||||
|
|
||||||
# Begin test section 1
|
# Begin test section 1
|
||||||
|
|
||||||
eval CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=$engine_type;
|
eval CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=$engine_type;
|
||||||
@@ -71,9 +52,7 @@ SELECT * FROM test.t2;
|
|||||||
|
|
||||||
let $message=< -- test 1 select slave after p1 -- >;
|
let $message=< -- test 1 select slave after p1 -- >;
|
||||||
--source include/show_msg.inc
|
--source include/show_msg.inc
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
SELECT * FROM test.t2;
|
SELECT * FROM test.t2;
|
||||||
|
|
||||||
@@ -86,9 +65,7 @@ SELECT * FROM test.t2;
|
|||||||
|
|
||||||
let $message=< -- test 1 select slave after p2 -- >;
|
let $message=< -- test 1 select slave after p2 -- >;
|
||||||
--source include/show_msg.inc
|
--source include/show_msg.inc
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
SELECT * FROM test.t2;
|
SELECT * FROM test.t2;
|
||||||
|
|
||||||
@@ -136,9 +113,7 @@ SELECT * FROM test.t2;
|
|||||||
|
|
||||||
let $message=< -- test 2 select Slave after p1 -- >;
|
let $message=< -- test 2 select Slave after p1 -- >;
|
||||||
--source include/show_msg.inc
|
--source include/show_msg.inc
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
SELECT * FROM test.t2;
|
SELECT * FROM test.t2;
|
||||||
|
|
||||||
@@ -153,9 +128,7 @@ SELECT * FROM test.t2;
|
|||||||
|
|
||||||
let $message=< -- test 1 select Slave after p2 -- >;
|
let $message=< -- test 1 select Slave after p2 -- >;
|
||||||
--source include/show_msg.inc
|
--source include/show_msg.inc
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
SELECT * FROM test.t2;
|
SELECT * FROM test.t2;
|
||||||
|
|
||||||
@@ -195,9 +168,7 @@ while ($n)
|
|||||||
|
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
select * from test.t3;
|
select * from test.t3;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from test.t3;
|
select * from test.t3;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@@ -216,9 +187,7 @@ while ($n)
|
|||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
select * from test.t3;
|
select * from test.t3;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from test.t3;
|
select * from test.t3;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@@ -228,12 +197,12 @@ connection master;
|
|||||||
# First lets cleanup
|
# First lets cleanup
|
||||||
SET AUTOCOMMIT=1;
|
SET AUTOCOMMIT=1;
|
||||||
SET FOREIGN_KEY_CHECKS=0;
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
DROP PROCEDURE IF EXISTS test.p3;
|
DROP PROCEDURE test.p3;
|
||||||
DROP PROCEDURE IF EXISTS test.p1;
|
DROP PROCEDURE test.p1;
|
||||||
DROP PROCEDURE IF EXISTS test.p2;
|
DROP PROCEDURE test.p2;
|
||||||
DROP TABLE IF EXISTS test.t1;
|
DROP TABLE test.t1;
|
||||||
DROP TABLE IF EXISTS test.t2;
|
DROP TABLE test.t2;
|
||||||
DROP TABLE IF EXISTS test.t3;
|
DROP TABLE test.t3;
|
||||||
sync_slave_with_master;
|
|
||||||
|
|
||||||
# End of 5.0 test case
|
# End of 5.0 test case
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -1,8 +1,4 @@
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# Original Author: JBM #
|
|
||||||
# Original Date: Aug/15/2005 #
|
|
||||||
# Updated: 08/29/2005 Remove sleeps #
|
|
||||||
#############################################################################
|
|
||||||
# TEST: SP that creates table, starts tranaction inserts. Save point, insert#
|
# TEST: SP that creates table, starts tranaction inserts. Save point, insert#
|
||||||
# rollback to save point and then commits. #
|
# rollback to save point and then commits. #
|
||||||
#############################################################################
|
#############################################################################
|
||||||
@@ -10,14 +6,6 @@
|
|||||||
-- source include/have_binlog_format_row.inc
|
-- source include/have_binlog_format_row.inc
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
|
|
||||||
# Begin clean up test section
|
|
||||||
connection master;
|
|
||||||
--disable_warnings
|
|
||||||
DROP PROCEDURE IF EXISTS test.p1;
|
|
||||||
DROP TABLE IF EXISTS test.t1;
|
|
||||||
--enable_warnings
|
|
||||||
# End of cleanup
|
|
||||||
|
|
||||||
# Begin test section 1
|
# Begin test section 1
|
||||||
delimiter |;
|
delimiter |;
|
||||||
eval CREATE PROCEDURE test.p1(IN i INT)
|
eval CREATE PROCEDURE test.p1(IN i INT)
|
||||||
@@ -42,9 +30,7 @@ SELECT * FROM test.t1;
|
|||||||
|
|
||||||
let $message=< ---- Slave selects-- >;
|
let $message=< ---- Slave selects-- >;
|
||||||
--source include/show_msg.inc
|
--source include/show_msg.inc
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
|
|
||||||
let $message=< ---- Master selects-- >;
|
let $message=< ---- Master selects-- >;
|
||||||
@@ -55,16 +41,15 @@ SELECT * FROM test.t1;
|
|||||||
|
|
||||||
let $message=< ---- Slave selects-- >;
|
let $message=< ---- Slave selects-- >;
|
||||||
--source include/show_msg.inc
|
--source include/show_msg.inc
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
#show binlog events;
|
#show binlog events;
|
||||||
|
|
||||||
|
|
||||||
DROP PROCEDURE IF EXISTS test.p1;
|
DROP PROCEDURE test.p1;
|
||||||
DROP TABLE IF EXISTS test.t1;
|
DROP TABLE test.t1;
|
||||||
|
|
||||||
# End of 5.0 test case
|
# End of 5.0 test case
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on
|
# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on
|
||||||
# delete cant find record
|
# delete cant find record
|
||||||
|
|
||||||
-- source include/master-slave-reset.inc
|
-- source include/rpl_reset.inc
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
-- eval CREATE TABLE t1 (c1 BIT, c2 INT) Engine=$engine
|
-- eval CREATE TABLE t1 (c1 BIT, c2 INT) Engine=$engine
|
||||||
@@ -37,8 +37,7 @@ INSERT INTO `t1` VALUES ( 1, 1 );
|
|||||||
UPDATE t1 SET c1=NULL where c2=1;
|
UPDATE t1 SET c1=NULL where c2=1;
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- let $diff_table_1=master:test.t1
|
-- let $diff_tables= master:t1, slave:t1
|
||||||
-- let $diff_table_2=slave:test.t1
|
|
||||||
-- source include/diff_tables.inc
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
@@ -46,15 +45,14 @@ UPDATE t1 SET c1=NULL where c2=1;
|
|||||||
DELETE FROM t1 WHERE c2=1 LIMIT 1;
|
DELETE FROM t1 WHERE c2=1 LIMIT 1;
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- let $diff_table_1=master:test.t1
|
-- let $diff_tables= master:t1, slave:t1
|
||||||
-- let $diff_table_2=slave:test.t1
|
|
||||||
-- source include/diff_tables.inc
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- source include/master-slave-reset.inc
|
-- source include/rpl_reset.inc
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
|
|
||||||
@@ -68,8 +66,7 @@ SELECT * FROM t1;
|
|||||||
UPDATE t1 SET c1=NULL WHERE c1='w';
|
UPDATE t1 SET c1=NULL WHERE c1='w';
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- let $diff_table_1=master:test.t1
|
-- let $diff_tables= master:t1, slave:t1
|
||||||
-- let $diff_table_2=slave:test.t1
|
|
||||||
-- source include/diff_tables.inc
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
@@ -77,8 +74,7 @@ UPDATE t1 SET c1=NULL WHERE c1='w';
|
|||||||
DELETE FROM t1 LIMIT 2;
|
DELETE FROM t1 LIMIT 2;
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
-- let $diff_table_1=master:test.t1
|
-- let $diff_tables= master:t1, slave:t1
|
||||||
-- let $diff_table_2=slave:test.t1
|
|
||||||
-- source include/diff_tables.inc
|
-- source include/diff_tables.inc
|
||||||
|
|
||||||
-- connection master
|
-- connection master
|
||||||
|
@@ -177,5 +177,3 @@ UNLOCK TABLES;
|
|||||||
--connection master
|
--connection master
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
# End of tests
|
|
||||||
|
@@ -1,131 +0,0 @@
|
|||||||
# Requires binlog_format=statement format since query involving
|
|
||||||
# get_lock() is logged in row format if binlog_format=mixed or row.
|
|
||||||
-- source include/have_binlog_format_statement.inc
|
|
||||||
-- source include/master-slave.inc
|
|
||||||
|
|
||||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
|
||||||
|
|
||||||
# Load some data into t1
|
|
||||||
create table t1 (word char(20) not null);
|
|
||||||
load data infile '../../std_data/words.dat' into table t1;
|
|
||||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
||||||
eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
|
|
||||||
select * from t1 limit 10;
|
|
||||||
|
|
||||||
#
|
|
||||||
# Test slave with wrong password
|
|
||||||
#
|
|
||||||
sync_slave_with_master;
|
|
||||||
stop slave;
|
|
||||||
connection master;
|
|
||||||
set password for root@"localhost" = password('foo');
|
|
||||||
connection slave;
|
|
||||||
start slave;
|
|
||||||
connection master;
|
|
||||||
#
|
|
||||||
# Give slave time to do at last one failed connect retry
|
|
||||||
# This one must be short so that the slave will not stop retrying
|
|
||||||
real_sleep 2;
|
|
||||||
set password for root@"localhost" = password('');
|
|
||||||
# Give slave time to connect (will retry every second)
|
|
||||||
sleep 2;
|
|
||||||
|
|
||||||
create table t3(n int);
|
|
||||||
insert into t3 values(1),(2);
|
|
||||||
sync_slave_with_master;
|
|
||||||
select * from t3;
|
|
||||||
select sum(length(word)) from t1;
|
|
||||||
connection master;
|
|
||||||
drop table t1,t3;
|
|
||||||
sync_slave_with_master;
|
|
||||||
|
|
||||||
# Test if the slave SQL thread can be more than 16K behind the slave
|
|
||||||
# I/O thread (> IO_SIZE)
|
|
||||||
|
|
||||||
connection master;
|
|
||||||
# we'll use table-level locking to delay slave SQL thread
|
|
||||||
eval create table t1 (n int) engine=$engine_type;
|
|
||||||
sync_slave_with_master;
|
|
||||||
connection master;
|
|
||||||
reset master;
|
|
||||||
connection slave;
|
|
||||||
stop slave;
|
|
||||||
reset slave;
|
|
||||||
|
|
||||||
connection master;
|
|
||||||
let $1=5000;
|
|
||||||
# Generate 16K of relay log
|
|
||||||
disable_query_log;
|
|
||||||
while ($1)
|
|
||||||
{
|
|
||||||
eval insert into t1 values($1);
|
|
||||||
dec $1;
|
|
||||||
}
|
|
||||||
enable_query_log;
|
|
||||||
|
|
||||||
# Try to cause a large relay log lag on the slave by locking t1
|
|
||||||
connection slave;
|
|
||||||
lock tables t1 read;
|
|
||||||
start slave;
|
|
||||||
connection master;
|
|
||||||
--source include/sync_slave_io_with_master.inc
|
|
||||||
unlock tables;
|
|
||||||
|
|
||||||
#test handling of aborted connection in the middle of update
|
|
||||||
|
|
||||||
connection master;
|
|
||||||
create table t2(id int);
|
|
||||||
insert into t2 values(connection_id());
|
|
||||||
|
|
||||||
connection master1;
|
|
||||||
# Avoid generating result
|
|
||||||
create temporary table t3(n int);
|
|
||||||
--disable_warnings
|
|
||||||
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
connection master;
|
|
||||||
send update t1 set n = n + get_lock('crash_lock%20C', 2);
|
|
||||||
connection master1;
|
|
||||||
sleep 3;
|
|
||||||
select (@id := id) - id from t2;
|
|
||||||
kill @id;
|
|
||||||
# We don't drop t3 as this is a temporary table
|
|
||||||
drop table t2;
|
|
||||||
connection master;
|
|
||||||
# The get_lock function causes warning for unsafe statement.
|
|
||||||
--disable_warnings
|
|
||||||
--error 1317,2013
|
|
||||||
reap;
|
|
||||||
--enable_warnings
|
|
||||||
connection slave;
|
|
||||||
# The SQL slave thread should now have stopped because the query was killed on
|
|
||||||
# the master (so it has a non-zero error code in the binlog).
|
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
|
||||||
|
|
||||||
# The following test can't be done because the result of Pos will differ
|
|
||||||
# on different computers
|
|
||||||
# --replace_result $MASTER_MYPORT MASTER_PORT
|
|
||||||
# show slave status;
|
|
||||||
|
|
||||||
set global sql_slave_skip_counter=1;
|
|
||||||
start slave;
|
|
||||||
select count(*) from t1;
|
|
||||||
connection master1;
|
|
||||||
drop table t1;
|
|
||||||
create table t1 (n int);
|
|
||||||
insert into t1 values(3456);
|
|
||||||
insert into mysql.user (Host, User, Password)
|
|
||||||
VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
|
|
||||||
select select_priv,user from mysql.user where user = _binary'blafasel2';
|
|
||||||
update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
|
|
||||||
select select_priv,user from mysql.user where user = _binary'blafasel2';
|
|
||||||
sync_slave_with_master;
|
|
||||||
select n from t1;
|
|
||||||
select select_priv,user from mysql.user where user = _binary'blafasel2';
|
|
||||||
connection master1;
|
|
||||||
drop table t1;
|
|
||||||
delete from mysql.user where user="blafasel2";
|
|
||||||
sync_slave_with_master;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
|
@@ -30,6 +30,11 @@ let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
|||||||
--echo Error: "$error" (expected different error codes on master and slave)
|
--echo Error: "$error" (expected different error codes on master and slave)
|
||||||
--echo Errno: "$errno" (expected 0)
|
--echo Errno: "$errno" (expected 0)
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
--source include/stop_slave.inc
|
||||||
|
# Clear error messages.
|
||||||
|
RESET SLAVE;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
|
--let $rpl_only_running_threads= 1
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
268
mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test
Normal file
268
mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
--echo
|
||||||
|
--echo
|
||||||
|
connection master;
|
||||||
|
|
||||||
|
if ($is_temporary)
|
||||||
|
{
|
||||||
|
--let $_temporary=TEMPORARY
|
||||||
|
}
|
||||||
|
|
||||||
|
CREATE TABLE t2(c1 INT, c2 char(10));
|
||||||
|
INSERT INTO t2 VALUES(1, 'abc'), (2, 'abc');
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # The original query should be binlogged if the table does not exist.
|
||||||
|
--echo # ------------------------------------------------------------------
|
||||||
|
--echo
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY)
|
||||||
|
SELECT 'abc' AS c3, 1 AS c4;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # The statement should be binlogged as two events. one is
|
||||||
|
--echo # 'CREATE $_temporary TABLE IF NOT EXISTS ..', another one is
|
||||||
|
--echo # 'INSERT ... SELECT'.
|
||||||
|
--echo # ------------------------------------------------------------------
|
||||||
|
--echo
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
SELECT 'abc', 2;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Verify if it can be binlogged with right database name when the table
|
||||||
|
--echo # is not in the default database
|
||||||
|
--echo
|
||||||
|
--disable_warnings
|
||||||
|
DROP DATABASE IF EXISTS db1;
|
||||||
|
--enable_warnings
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
USE db1;
|
||||||
|
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS test.t1
|
||||||
|
SELECT 'abc', 20;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:test.t1,slave:test.t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
USE test;
|
||||||
|
DROP DATABASE db1;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # It should be binlogged as 'REPLACE ... SELECT'
|
||||||
|
--echo # if the original statement has option REPLACE
|
||||||
|
--echo
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
REPLACE SELECT '123', 2;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # It should be binlogged as 'INSERT IGNORE... SELECT'
|
||||||
|
--echo # if the original statement has option IGNORE
|
||||||
|
--echo
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
IGNORE SELECT '123', 2;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Nothing should be binlogged if error happens and no any row is inserted
|
||||||
|
--echo
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
--error ER_DUP_ENTRY
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
SELECT '123', 2;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Verify it can binlog well when there are some braces('(')
|
||||||
|
--echo
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
(SELECT '123', 3) UNION (SELECT '123', 4);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
REPLACE (SELECT 'abc', 3) UNION (SELECT 'abc', 4);
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
IGNORE (SELECT '123', 3) UNION (SELECT '123', 4);
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--echo
|
||||||
|
--echo # Throw a warning that table already exists and don't insert anything
|
||||||
|
--echo
|
||||||
|
CREATE VIEW t3 AS SELECT * FROM t2;
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS t3
|
||||||
|
SELECT '123', 2;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
DROP VIEW t3;
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # The statement can be binlogged correctly when it is in a SP/EVENT/TRIGGER
|
||||||
|
--echo
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP PROCEDURE IF EXISTS p1;
|
||||||
|
--enable_warnings
|
||||||
|
eval CREATE PROCEDURE p1(IN a INT)
|
||||||
|
CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT '123', a;
|
||||||
|
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
call p1(500);
|
||||||
|
call p1(600);
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # The statement can be binlogged correctly when it is in a prepared statement
|
||||||
|
--echo
|
||||||
|
eval PREPARE stm FROM "CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT '123', ?";
|
||||||
|
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
SET @a= 700;
|
||||||
|
EXECUTE stm USING @a;
|
||||||
|
SET @a= 800;
|
||||||
|
EXECUTE stm USING @a;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # The statement can be binlogged correctly when it is in a conditional comment
|
||||||
|
--echo
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
|
--echo # The whole statement in a conditional comment
|
||||||
|
eval /*!CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
SELECT 'abc', 900*/;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # There is an long comment before SELECT
|
||||||
|
eval /*!CREATE $_temporary /*blabla*/ TABLE IF NOT EXISTS t1
|
||||||
|
SELECT 'abc', 901*/;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Conditional comment starts just from SELECT
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
/*!SELECT 'abc',*/ 902;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Only SELECT keyword is in the conditional comment
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
/*!SELECT*/ /*!'abc',*/ 904;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Conditional comment is after SELECT keyword
|
||||||
|
eval CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
SELECT /*!'abc',*/ 903;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Conditional comment ends just before SELECT keyword
|
||||||
|
eval /*!CREATE $_temporary TABLE IF NOT EXISTS t1
|
||||||
|
*/SELECT 'abc', 905;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
--connection master
|
||||||
|
|
||||||
|
if (!$is_temporary)
|
||||||
|
{
|
||||||
|
--let $diff_tables= master:t1,slave:t1
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
DROP TABLE t2;
|
||||||
|
eval DROP $_temporary TABLE t1;
|
||||||
|
|
@@ -139,9 +139,10 @@ set @@global.debug="-d";
|
|||||||
# clean-up
|
# clean-up
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# the sql thread has an error, so reset replication state
|
||||||
|
--let $rpl_only_running_threads= 1
|
||||||
|
--source include/rpl_reset.inc
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
drop table tm, ti;
|
drop table tm, ti;
|
||||||
|
--sync_slave_with_master
|
||||||
connection slave; # slave SQL thread is stopped
|
|
||||||
source include/stop_slave.inc;
|
|
||||||
drop table tm, ti;
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
# --source extra/rpl_tests/rpl_stop_slave.test
|
# --source extra/rpl_tests/rpl_stop_slave.test
|
||||||
#
|
#
|
||||||
|
|
||||||
if (`SELECT "$tmp_table_stm" = ''`)
|
if (!$tmp_table_stm)
|
||||||
{
|
{
|
||||||
--echo \$tmp_table_stm is NULL
|
--echo \$tmp_table_stm is NULL
|
||||||
--die $tmp_table_stm is NULL
|
--die $tmp_table_stm is NULL
|
||||||
@@ -52,9 +52,8 @@ source include/wait_for_slave_sql_to_stop.inc;
|
|||||||
|
|
||||||
--echo # Slave should stop after the transaction has committed.
|
--echo # Slave should stop after the transaction has committed.
|
||||||
--echo # So t1 on master is same to t1 on slave.
|
--echo # So t1 on master is same to t1 on slave.
|
||||||
let diff_table_1=master:test.t1;
|
--let $diff_tables= master:t1, slave:t1
|
||||||
let diff_table_2=slave:test.t1;
|
--source include/diff_tables.inc
|
||||||
source include/diff_tables.inc;
|
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
START SLAVE SQL_THREAD;
|
START SLAVE SQL_THREAD;
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
####################
|
|
||||||
# Change Author: JBM
|
|
||||||
# Change Date: 2006-01-17
|
|
||||||
# Change: Added order by in select
|
|
||||||
####################
|
|
||||||
# Change Date: 2006-02-02
|
|
||||||
# Change: renamed to make bettre sense,
|
|
||||||
# and wrapped per Engine test
|
|
||||||
############################
|
|
||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -30,6 +21,5 @@ sync_slave_with_master;
|
|||||||
SELECT * FROM t1 ORDER BY id;
|
SELECT * FROM t1 ORDER BY id;
|
||||||
connection master;
|
connection master;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
sync_slave_with_master;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
--source include/rpl_end.inc
|
||||||
|
86
mysql-test/extra/rpl_tests/rpl_test_framework.inc
Normal file
86
mysql-test/extra/rpl_tests/rpl_test_framework.inc
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Auxiliary file used by suite/rpl/t/rpl_test_framework.test
|
||||||
|
#
|
||||||
|
# The purpose is to check that the sync chain generated in
|
||||||
|
# rpl_change_topology.inc (invoked from rpl_init.inc) is correct. This
|
||||||
|
# is done in two ways:
|
||||||
|
# (1) Print the sync chain.
|
||||||
|
# (2) Execute a statement and verify that it replicates to all slaves.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Implementation ====
|
||||||
|
#
|
||||||
|
# Does this:
|
||||||
|
# (1) Set up a given replication topology (rpl_init.inc)
|
||||||
|
# (2) Print $rpl_sync_chain
|
||||||
|
# (3) Execute "DELETE FROM t1" and then "INSERT INTO t1" on the master
|
||||||
|
# (4) Sync and compare all servers.
|
||||||
|
# (5) Clean up the replication topology (rpl_end.inc)
|
||||||
|
#
|
||||||
|
# (Technical detail: Since DELETE FROM t1 is not executed at the end,
|
||||||
|
# some servers may have rows left in t1 from a previous invocation of
|
||||||
|
# rpl_test_framework.inc. Therefore, this file will only work in
|
||||||
|
# statement mode where "DELETE FROM t1" removes rows that exist on
|
||||||
|
# slave but not on master.)
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --let $rpl_server_count= <number>
|
||||||
|
# --let $rpl_topology= <topology specification>
|
||||||
|
# --let $masters= <list of masters>
|
||||||
|
# [--let $rpl_diff_servers= <list of servers>]
|
||||||
|
# --source extra/rpl_tests/rpl_test_framework.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $next_number
|
||||||
|
# The INSERT statement will insert $next_number into t1, and
|
||||||
|
# $next_number will increase by 1.
|
||||||
|
#
|
||||||
|
# $rpl_server_count, $rpl_topology:
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
#
|
||||||
|
# $masters
|
||||||
|
# This should be a list of numbers, each identifying a server.
|
||||||
|
# The DELETE and INSERT statements will be executed on all servers
|
||||||
|
# in the list.
|
||||||
|
#
|
||||||
|
# $rpl_diff_servers
|
||||||
|
# See include/rpl_diff.inc
|
||||||
|
|
||||||
|
--source include/rpl_init.inc
|
||||||
|
--source include/rpl_generate_sync_chain.inc
|
||||||
|
--echo rpl_sync_chain= '$rpl_sync_chain'
|
||||||
|
|
||||||
|
--inc $next_number
|
||||||
|
|
||||||
|
# Iterate over masters
|
||||||
|
while ($masters)
|
||||||
|
{
|
||||||
|
--let $master_i= `SELECT SUBSTRING_INDEX('$masters', ',', 1)`
|
||||||
|
--let $masters= `SELECT SUBSTRING('$masters', LENGTH('$master_i') + 2)`
|
||||||
|
|
||||||
|
# Connect to master and execute statement
|
||||||
|
--let $rpl_connection_name= server_$master_i
|
||||||
|
--source include/rpl_connection.inc
|
||||||
|
DELETE FROM t1;
|
||||||
|
--eval INSERT INTO t1 VALUES ($next_number)
|
||||||
|
}
|
||||||
|
|
||||||
|
--source include/rpl_sync.inc
|
||||||
|
|
||||||
|
# Compare all servers.
|
||||||
|
--let $diff_tables= server_$rpl_server_count:t1
|
||||||
|
--let $server_i= $rpl_server_count
|
||||||
|
--dec $server_i
|
||||||
|
while ($server_i)
|
||||||
|
{
|
||||||
|
--let $diff_tables= server_$server_i:t1,$diff_tables
|
||||||
|
--dec $server_i
|
||||||
|
}
|
||||||
|
--source include/diff_tables.inc
|
||||||
|
|
||||||
|
--let $diff_servers=
|
||||||
|
--let $masters=
|
||||||
|
--source include/rpl_end.inc
|
@@ -1,11 +1,6 @@
|
|||||||
#
|
|
||||||
# Copyright 2006 MySQL. All rights reserved.
|
|
||||||
#
|
|
||||||
# Test to check for the different version of truncating a table.
|
# Test to check for the different version of truncating a table.
|
||||||
# The statements are "TRUNCATE tbl" and "DELETE FROM tbl". We check
|
# The statements are "TRUNCATE tbl" and "DELETE FROM tbl". We check
|
||||||
# the behaviour of each possible value for BINLOG_FORMAT.
|
# the behaviour of each possible value for BINLOG_FORMAT.
|
||||||
#
|
|
||||||
# Author(s): Mats Kindahl
|
|
||||||
|
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
@@ -14,3 +9,5 @@ let $trunc_stmt = TRUNCATE TABLE;
|
|||||||
|
|
||||||
let $trunc_stmt = DELETE FROM;
|
let $trunc_stmt = DELETE FROM;
|
||||||
--source extra/rpl_tests/rpl_truncate_helper.test
|
--source extra/rpl_tests/rpl_truncate_helper.test
|
||||||
|
|
||||||
|
--source include/rpl_end.inc
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
source include/reset_master_and_slave.inc;
|
--source include/rpl_reset.inc
|
||||||
|
|
||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
connection master;
|
connection master;
|
||||||
@@ -10,8 +10,7 @@ connection master;
|
|||||||
eval $trunc_stmt t1;
|
eval $trunc_stmt t1;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t1;
|
let $diff_tables= master:t1, slave:t1;
|
||||||
let $diff_table_2=slave:test.t1;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
--echo ==== Test using a table with delete triggers ====
|
--echo ==== Test using a table with delete triggers ====
|
||||||
@@ -26,8 +25,7 @@ connection master;
|
|||||||
eval $trunc_stmt t1;
|
eval $trunc_stmt t1;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
let $diff_table_1=master:test.t2;
|
let $diff_tables= master:t2, slave:t2;
|
||||||
let $diff_table_2=slave:test.t2;
|
|
||||||
source include/diff_tables.inc;
|
source include/diff_tables.inc;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
@@ -876,7 +876,5 @@ let $can_convert = $if_is_lossy;
|
|||||||
source extra/rpl_tests/check_type.inc;
|
source extra/rpl_tests/check_type.inc;
|
||||||
|
|
||||||
|
|
||||||
disable_warnings;
|
--source include/rpl_reset.inc
|
||||||
source include/reset_master_and_slave.inc;
|
|
||||||
enable_warnings;
|
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
SHOW PROCESSLIST;
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# This is an auxiliary file that mysqltest executes when
|
||||||
|
# sync_slave_with_master or sync_with_master fails. The purpose is to
|
||||||
|
# print debug information.
|
||||||
|
|
||||||
let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1);
|
--let $rpl_server_count= 0
|
||||||
eval SHOW BINLOG EVENTS IN '$binlog_name';
|
--let $rpl_only_current_connection= 1
|
||||||
|
--source include/show_rpl_debug_info.inc
|
||||||
exit;
|
|
||||||
|
175
mysql-test/include/assert.inc
Normal file
175
mysql-test/include/assert.inc
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Check if a condition holds, fail with debug info if not.
|
||||||
|
#
|
||||||
|
# The condition is parsed before executed. The following constructs
|
||||||
|
# are supported:
|
||||||
|
#
|
||||||
|
# [SQL_STATEMENT, COLUMN, ROW]
|
||||||
|
# The square bracket is replaced by the result from SQL_STATEMENT,
|
||||||
|
# in the given COLUMN and ROW.
|
||||||
|
#
|
||||||
|
# Optionally, SQL_STATEMENT may have the form:
|
||||||
|
# connection:SQL_STATEMENT
|
||||||
|
# In this case, SQL_STATEMENT is executed on the named connection.
|
||||||
|
# All other queries executed by this script will be executed on
|
||||||
|
# the connection that was in use when this script was started.
|
||||||
|
# The current connection will also be restored at the end of this
|
||||||
|
# script.
|
||||||
|
#
|
||||||
|
# Nested sub-statements on this form are not allowed.
|
||||||
|
#
|
||||||
|
# <1>
|
||||||
|
# This is a shorthand for the result of the first executed square
|
||||||
|
# bracket. <2> is a shorthand for the second executed square
|
||||||
|
# bracket, and so on.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --let $assert_text= Relay_Log_Pos must be between min_pos and max_pos
|
||||||
|
# --let $assert_cond= [SHOW SLAVE STATUS, Relay_Log_Pos, 1] >= $min_pos AND <1> <= $max_pos
|
||||||
|
# [--let $assert_quiet= 1]
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/assert.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
#
|
||||||
|
# $assert_text
|
||||||
|
# Text that describes what is being checked. This text is written to
|
||||||
|
# the query log so it should not contain non-deterministic elements.
|
||||||
|
#
|
||||||
|
# $assert_cond
|
||||||
|
# Condition to check. See above for details about the format. The
|
||||||
|
# condition will be executed as `SELECT $assert_cond`.
|
||||||
|
#
|
||||||
|
# Both $assert_cond and the result from any substatement on the
|
||||||
|
# form [SQL_STATEMENT, COLUMN, ROW] will be used in SQL statements,
|
||||||
|
# inside single quotes (as in '$assert_text'). So any single quotes
|
||||||
|
# in these texts must be escaped or replaced by double quotes.
|
||||||
|
#
|
||||||
|
# $rpl_debug
|
||||||
|
# Print extra debug info.
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= assert.inc [$assert_text]
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # debug: assert_text='$assert_text' assert_cond='$assert_cond'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sanity-check input
|
||||||
|
if (!$assert_text)
|
||||||
|
{
|
||||||
|
--die ERROR IN TEST: the mysqltest variable rpl_test must be set
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_assert_old_connection= $CURRENT_CONNECTION
|
||||||
|
|
||||||
|
# Evaluate square brackets in cond.
|
||||||
|
--let $_assert_substmt_number= 1
|
||||||
|
--let $_assert_cond_interp= '$assert_cond'
|
||||||
|
--let $_assert_lbracket= `SELECT LOCATE('[', $_assert_cond_interp)`
|
||||||
|
while ($_assert_lbracket)
|
||||||
|
{
|
||||||
|
# Get position of right bracket
|
||||||
|
--let $_assert_rbracket= `SELECT LOCATE(']', $_assert_cond_interp)`
|
||||||
|
if (!$_assert_rbracket)
|
||||||
|
{
|
||||||
|
--echo BUG IN TEST: Mismatching square brackets in assert_cond.
|
||||||
|
--echo Original assert_cond='$assert_cond'
|
||||||
|
--echo Interpolated assert_cond=$_assert_cond_interp
|
||||||
|
--die BUG IN TEST: Mismatching square brackets in $assert_cond
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get sub-statement from statement. Preserve escapes for single quotes.
|
||||||
|
--let $_assert_full_substmt= `SELECT QUOTE(SUBSTRING($_assert_cond_interp, $_assert_lbracket + 1, $_assert_rbracket - $_assert_lbracket - 1))`
|
||||||
|
|
||||||
|
# Get connection from sub-statement
|
||||||
|
--let $_assert_colon= `SELECT IF($_assert_full_substmt REGEXP '^[a-zA-Z_][a-zA-Z_0-9]*:', LOCATE(':', $_assert_full_substmt), 0)`
|
||||||
|
--let $_assert_connection=
|
||||||
|
--let $_assert_substmt= $_assert_full_substmt
|
||||||
|
if ($_assert_colon)
|
||||||
|
{
|
||||||
|
--let $_assert_connection= `SELECT SUBSTRING($_assert_substmt, 1, $_assert_colon - 1)`
|
||||||
|
# Preserve escapes for single quotes.
|
||||||
|
--let $_assert_substmt= `SELECT QUOTE(SUBSTRING($_assert_substmt, $_assert_colon + 1))`
|
||||||
|
}
|
||||||
|
|
||||||
|
# Interpolate escapes before using condition outside string context.
|
||||||
|
--let $_assert_substmt_interp= `SELECT $_assert_substmt`
|
||||||
|
|
||||||
|
# Execute and get result from sub-statement
|
||||||
|
if ($_assert_connection)
|
||||||
|
{
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # debug: connection='$_assert_connection' sub-statement=$_assert_substmt
|
||||||
|
}
|
||||||
|
--let $rpl_connection_name= $_assert_connection
|
||||||
|
--source include/rpl_connection.inc
|
||||||
|
--let $_assert_substmt_result= query_get_value($_assert_substmt_interp)
|
||||||
|
--let $rpl_connection_name= $_assert_old_connection
|
||||||
|
--source include/rpl_connection.inc
|
||||||
|
}
|
||||||
|
if (!$_assert_connection)
|
||||||
|
{
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # debug: old connection, sub-statement=$_assert_substmt
|
||||||
|
}
|
||||||
|
--let $_assert_substmt_result= query_get_value($_assert_substmt_interp)
|
||||||
|
}
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # debug: result of sub-statement='$_assert_substmt_result'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Replace sub-statement by its result
|
||||||
|
--let $_assert_cond_interp= `SELECT QUOTE(REPLACE($_assert_cond_interp, CONCAT('[', $_assert_full_substmt, ']'), '$_assert_substmt_result'))`
|
||||||
|
# Replace result references by result
|
||||||
|
--let $_assert_cond_interp= `SELECT QUOTE(REPLACE($_assert_cond_interp, '<$_assert_substmt_number>', '$_assert_substmt_result'))`
|
||||||
|
|
||||||
|
--let $_assert_lbracket= `SELECT LOCATE('[', $_assert_cond_interp)`
|
||||||
|
|
||||||
|
--inc $_assert_substmt_number
|
||||||
|
}
|
||||||
|
|
||||||
|
# Interpolate escapes before using condition outside string context.
|
||||||
|
--let $_assert_cond_interp= `SELECT $_assert_cond_interp`
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # debug: interpolated_cond='$_assert_cond_interp'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Execute.
|
||||||
|
--let $_assert_result= `SELECT $_assert_cond_interp`
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # debug: result='$_assert_result'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check.
|
||||||
|
if (!$_assert_result)
|
||||||
|
{
|
||||||
|
--echo ######## Test assertion failed: $assert_text ########
|
||||||
|
--echo Dumping debug info:
|
||||||
|
if ($rpl_inited)
|
||||||
|
{
|
||||||
|
--source include/show_rpl_debug_info.inc
|
||||||
|
}
|
||||||
|
--echo Assertion text: '$assert_text'
|
||||||
|
--echo Assertion condition: '$assert_cond'
|
||||||
|
--echo Assertion condition, interpolated: '$_assert_cond_interp'
|
||||||
|
--echo Assertion result: '$_assert_result'
|
||||||
|
--die Test assertion failed in assertion.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $include_filename= assert.inc [$assert_text]
|
||||||
|
--source include/end_include_file.inc
|
||||||
|
|
||||||
|
--let $assert_text=
|
||||||
|
--let $assert_cond=
|
83
mysql-test/include/begin_include_file.inc
Normal file
83
mysql-test/include/begin_include_file.inc
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# This is an auxiliary file that facilitates writing include/*.inc
|
||||||
|
# files. It has three purposes:
|
||||||
|
#
|
||||||
|
# 1. Store mtr's state at the beginning of the .inc file and restore
|
||||||
|
# the state at the end. The following status is restored:
|
||||||
|
#
|
||||||
|
# disable_warnings
|
||||||
|
# disable_query_log
|
||||||
|
# disable_result_log
|
||||||
|
# disable_abort_on_errors
|
||||||
|
# Current connection
|
||||||
|
#
|
||||||
|
# 2. This file also prints the name of the .inc file that sources
|
||||||
|
# it. Only the name of the top-level .inc file is printed: if
|
||||||
|
# file_1.inc sources file_2.inc, then this file only prints
|
||||||
|
# file_1.inc.
|
||||||
|
#
|
||||||
|
# 3. If the mysqltest variable $rpl_debug is set, then
|
||||||
|
# this file will print:
|
||||||
|
#
|
||||||
|
# ==== BEGIN include/<filename> ====
|
||||||
|
#
|
||||||
|
# and end_include_file.inc will print
|
||||||
|
#
|
||||||
|
# ==== END include/<filename> ====
|
||||||
|
#
|
||||||
|
# These printouts are indented to make it easier to read the
|
||||||
|
# result log.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# # At the beginning of include/my_file.inc:
|
||||||
|
# --let $include_filename= my_file.inc
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/begin_include_file.inc
|
||||||
|
#
|
||||||
|
# # At the end of include/my_file.inc:
|
||||||
|
# --let $include_filename= my_file.inc
|
||||||
|
# --source include/end_include_file.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $include_filename
|
||||||
|
# The basename of the file: a file named /path/to/my_file.inc
|
||||||
|
# should set $include_filename=my_file.inc. This parameter
|
||||||
|
# must be provided both for begin_include_file.inc and
|
||||||
|
# end_include_file.inc.
|
||||||
|
#
|
||||||
|
# $rpl_debug
|
||||||
|
# If set, this script will print the following text:
|
||||||
|
# ==== BEGIN include/$include_filename.inc ====
|
||||||
|
|
||||||
|
|
||||||
|
# Print 'include/$include_filename', but only when invoked from
|
||||||
|
# the top-level. We don't want to print
|
||||||
|
# 'include/$include_filename' from all files included
|
||||||
|
# recursively.
|
||||||
|
if (!$_include_file_depth)
|
||||||
|
{
|
||||||
|
--echo include/$include_filename
|
||||||
|
--let $_include_file_depth= 0
|
||||||
|
}
|
||||||
|
--inc $_include_file_depth
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo $_include_file_indent==== BEGIN include/$include_filename ====
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_include_file_enabled_warnings= $ENABLED_WARNINGS$_include_file_enabled_warnings
|
||||||
|
--let $_include_file_enabled_query_log= $ENABLED_QUERY_LOG$_include_file_enabled_query_log
|
||||||
|
--let $_include_file_enabled_result_log= $ENABLED_RESULT_LOG$_include_file_enabled_result_log
|
||||||
|
--let $_include_file_enabled_abort_on_error= $ENABLED_ABORT_ON_ERROR$_include_file_enabled_abort_on_error
|
||||||
|
--let $_include_file_connection= $CURRENT_CONNECTION,$_include_file_connection
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLED_WARNINGS' qlog='$ENABLED_QUERY_LOG' rlog='$ENABLED_RESULT_LOG' aborterr='$ENABLED_ABORT_ON_ERROR'
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $include_filename=
|
||||||
|
--let $_include_file_indent= .$_include_file_indent
|
@@ -1,15 +1,73 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# This test is executed twice for each test case. Before every
|
||||||
|
# testcase it is run with mysqltest in record mode and will thus
|
||||||
|
# produce an output file that can be compared to output from after the
|
||||||
|
# tescase. In that way, it is possible to check that a testcase does
|
||||||
|
# not have any unwanted side affects.
|
||||||
|
|
||||||
#
|
|
||||||
# This test is executed twice for each test case if mysql-test-run is passed
|
|
||||||
# the flag --check-testcase. Before every testcase it is run with mysqltest
|
|
||||||
# in record mode and will thus produce an output file that can be compared
|
|
||||||
# to output from after the tescase.
|
|
||||||
# In that way its possible to check that a testcase does not have
|
|
||||||
# any unwanted side affects.
|
|
||||||
#
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
|
|
||||||
|
# We want to ensure all slave configuration is restored. But SHOW
|
||||||
|
# SLAVE STATUS returns nothing for servers not configured as slaves,
|
||||||
|
# and (after BUG#28796 was fixed) there is no way to de-configure a
|
||||||
|
# slave. Hence, it's impossible to clean up the replication state at
|
||||||
|
# the end. But we want to check that the slave is stopped, there is
|
||||||
|
# no error, and a few other invariants. So we issue SHOW SLAVE
|
||||||
|
# STATUS, and if it returns no rows we fake the result.
|
||||||
|
--let $tmp= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1)
|
||||||
|
--let $tmp= `SELECT '$tmp' = 'No such row'`
|
||||||
|
if ($tmp)
|
||||||
|
{
|
||||||
|
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
|
||||||
|
--echo Slave_IO_State
|
||||||
|
--echo Master_Host 127.0.0.1
|
||||||
|
--echo Master_User root
|
||||||
|
--echo Master_Port #
|
||||||
|
--echo Connect_Retry #
|
||||||
|
--echo Master_Log_File #
|
||||||
|
--echo Read_Master_Log_Pos #
|
||||||
|
--echo Relay_Log_File #
|
||||||
|
--echo Relay_Log_Pos #
|
||||||
|
--echo Relay_Master_Log_File #
|
||||||
|
--echo Slave_IO_Running No
|
||||||
|
--echo Slave_SQL_Running No
|
||||||
|
--echo Replicate_Do_DB #
|
||||||
|
--echo Replicate_Ignore_DB #
|
||||||
|
--echo Replicate_Do_Table #
|
||||||
|
--echo Replicate_Ignore_Table #
|
||||||
|
--echo Replicate_Wild_Do_Table #
|
||||||
|
--echo Replicate_Wild_Ignore_Table #
|
||||||
|
--echo Last_Errno 0
|
||||||
|
--echo Last_Error
|
||||||
|
--echo Skip_Counter 0
|
||||||
|
--echo Exec_Master_Log_Pos #
|
||||||
|
--echo Relay_Log_Space #
|
||||||
|
--echo Until_Condition #
|
||||||
|
--echo Until_Log_File #
|
||||||
|
--echo Until_Log_Pos #
|
||||||
|
--echo Master_SSL_Allowed No
|
||||||
|
--echo Master_SSL_CA_File
|
||||||
|
--echo Master_SSL_CA_Path
|
||||||
|
--echo Master_SSL_Cert
|
||||||
|
--echo Master_SSL_Cipher
|
||||||
|
--echo Master_SSL_Key
|
||||||
|
--echo Seconds_Behind_Master NULL
|
||||||
|
--echo Master_SSL_Verify_Server_Cert No
|
||||||
|
--echo Last_IO_Errno 0
|
||||||
|
--echo Last_IO_Error
|
||||||
|
--echo Last_SQL_Errno 0
|
||||||
|
--echo Last_SQL_Error
|
||||||
|
--echo Replicate_Ignore_Server_Ids
|
||||||
|
--echo Master_Server_Id #
|
||||||
|
}
|
||||||
|
if (!$tmp) {
|
||||||
|
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
|
||||||
|
--replace_column 4 # 5 # 6 # 7 # 8 # 9 # 10 # 13 # 14 # 15 # 16 # 17 # 18 # 22 # 23 # 24 # 25 # 26 # 40 #
|
||||||
|
query_vertical
|
||||||
|
SHOW SLAVE STATUS;
|
||||||
|
}
|
||||||
|
|
||||||
call mtr.check_testcase();
|
call mtr.check_testcase();
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ if (!$err)
|
|||||||
{
|
{
|
||||||
--echo Success: Was able to run '$statement' under FTWRL.
|
--echo Success: Was able to run '$statement' under FTWRL.
|
||||||
unlock tables;
|
unlock tables;
|
||||||
if (`SELECT "$cleanup_stmt" <> ""`)
|
if ($cleanup_stmt)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt;
|
--eval $cleanup_stmt;
|
||||||
}
|
}
|
||||||
@@ -91,12 +91,12 @@ connection default;
|
|||||||
--reap
|
--reap
|
||||||
}
|
}
|
||||||
|
|
||||||
if (`SELECT "$cleanup_stmt" <> ""`)
|
if ($cleanup_stmt)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt;
|
--eval $cleanup_stmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (`SELECT "$skip_3rd_check" = ""`)
|
if (!$skip_3rd_check)
|
||||||
{
|
{
|
||||||
#
|
#
|
||||||
# Finally, let us check that FTWRL will succeed if this statement
|
# Finally, let us check that FTWRL will succeed if this statement
|
||||||
@@ -147,7 +147,7 @@ connection default;
|
|||||||
}
|
}
|
||||||
|
|
||||||
set debug_sync= "RESET";
|
set debug_sync= "RESET";
|
||||||
if (`SELECT "$cleanup_stmt" <> ""`)
|
if ($cleanup_stmt)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt;
|
--eval $cleanup_stmt;
|
||||||
}
|
}
|
||||||
|
@@ -41,11 +41,11 @@ if (!$err)
|
|||||||
{
|
{
|
||||||
--echo Error: Was able to run '$statement' under FTWRL!
|
--echo Error: Was able to run '$statement' under FTWRL!
|
||||||
unlock tables;
|
unlock tables;
|
||||||
if (`SELECT "$cleanup_stmt1" <> ""`)
|
if ($cleanup_stmt1)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt1;
|
--eval $cleanup_stmt1;
|
||||||
}
|
}
|
||||||
if (`SELECT "$cleanup_stmt2" <> ""`)
|
if ($cleanup_stmt2)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt2;
|
--eval $cleanup_stmt2;
|
||||||
}
|
}
|
||||||
@@ -88,16 +88,16 @@ unlock tables;
|
|||||||
connection default;
|
connection default;
|
||||||
--reap
|
--reap
|
||||||
|
|
||||||
if (`SELECT "$cleanup_stmt1" <> ""`)
|
if ($cleanup_stmt1)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt1;
|
--eval $cleanup_stmt1;
|
||||||
}
|
}
|
||||||
if (`SELECT "$cleanup_stmt2" <> ""`)
|
if ($cleanup_stmt2)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt2;
|
--eval $cleanup_stmt2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (`SELECT "$skip_3rd_check" = ""`)
|
if (!$skip_3rd_check)
|
||||||
{
|
{
|
||||||
#
|
#
|
||||||
# Finally, let us check that FTWRL will not succeed if this
|
# Finally, let us check that FTWRL will not succeed if this
|
||||||
@@ -141,11 +141,11 @@ connection default;
|
|||||||
|
|
||||||
set debug_sync= "RESET";
|
set debug_sync= "RESET";
|
||||||
|
|
||||||
if (`SELECT "$cleanup_stmt1" <> ""`)
|
if ($cleanup_stmt1)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt1;
|
--eval $cleanup_stmt1;
|
||||||
}
|
}
|
||||||
if (`SELECT "$cleanup_stmt2" <> ""`)
|
if ($cleanup_stmt2)
|
||||||
{
|
{
|
||||||
--eval $cleanup_stmt2;
|
--eval $cleanup_stmt2;
|
||||||
}
|
}
|
||||||
|
@@ -2,25 +2,29 @@
|
|||||||
#
|
#
|
||||||
# Assert that the slave threads are running and don't have any errors.
|
# Assert that the slave threads are running and don't have any errors.
|
||||||
#
|
#
|
||||||
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
# --source include/check_slave_running.inc
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/check_slave_is_running.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $rpl_debug
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
--echo Checking that both slave threads are running.
|
|
||||||
|
|
||||||
--let $running= 1
|
--let $include_filename= check_slave_is_running.inc
|
||||||
--let $slave_sql_running = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1)
|
--source include/begin_include_file.inc
|
||||||
--let $slave_io_running = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1)
|
|
||||||
|
|
||||||
if ($slave_sql_running != Yes) {
|
|
||||||
--let $running= 0
|
|
||||||
}
|
|
||||||
if ($slave_io_running != Yes) {
|
|
||||||
--let $running= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$running) {
|
--let $slave_param= Slave_IO_Running
|
||||||
--echo Slave not running: Slave_SQL_Running = $slave_sql_running Slave_IO_Running = $slave_io_running
|
--let $slave_param_value= Yes
|
||||||
--source include/show_rpl_debug_info.inc
|
--source include/check_slave_param.inc
|
||||||
--die Expected slave to be running, but it was not running.
|
|
||||||
}
|
--let $slave_param= Slave_SQL_Running
|
||||||
|
--let $slave_param_value= Yes
|
||||||
|
--source include/check_slave_param.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= check_slave_is_running.inc
|
||||||
|
--source include/end_include_file.inc
|
||||||
|
@@ -1,12 +1,22 @@
|
|||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# Assert that Slave_SQL_Error and Slave_IO_Error are empty.
|
# Assert that Slave_SQL_Errno = Slave_IO_Errno = 0 in the output from
|
||||||
|
# SHOW SLAVE STATUS.
|
||||||
|
#
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
# --let $slave_param= Exec_Master_Log_Pos
|
# [--let $rpl_debug= 1]
|
||||||
# --let $slave_param_value= 4711
|
# --source include/check_slave_no_error.inc
|
||||||
# --source include/check_slave_running.inc
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $rpl_debug
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= check_slave_no_error.inc
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
--let $slave_param= Last_SQL_Errno
|
--let $slave_param= Last_SQL_Errno
|
||||||
--let $slave_param_value= 0
|
--let $slave_param_value= 0
|
||||||
@@ -15,3 +25,7 @@
|
|||||||
--let $slave_param= Last_IO_Errno
|
--let $slave_param= Last_IO_Errno
|
||||||
--let $slave_param_value= 0
|
--let $slave_param_value= 0
|
||||||
--source include/check_slave_param.inc
|
--source include/check_slave_param.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= check_slave_no_error.inc
|
||||||
|
--source include/end_include_file.inc
|
||||||
|
@@ -4,13 +4,33 @@
|
|||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
|
# --let $slave_param= COLUMN_NAME
|
||||||
|
# --let $slave_param_value= VALUE
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/check_slave_param.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $slave_param, $slave_param_value
|
||||||
|
# Column name in output of SHOW SLAVE STATUS that should be checked,
|
||||||
|
# and the expected value. Example:
|
||||||
# --let $slave_param= Exec_Master_Log_Pos
|
# --let $slave_param= Exec_Master_Log_Pos
|
||||||
# --let $slave_param_value= 4711
|
# --let $slave_param_value= 4711
|
||||||
# --source include/check_slave_param.inc
|
#
|
||||||
|
# $rpl_debug
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= check_slave_param.inc [$slave_param]
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
--let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
|
--let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
|
||||||
if ($_param_value != $slave_param_value) {
|
if ($_param_value != $slave_param_value) {
|
||||||
--echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
|
|
||||||
--source include/show_rpl_debug_info.inc
|
--source include/show_rpl_debug_info.inc
|
||||||
|
--echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
|
||||||
--die Wrong value for slave parameter
|
--die Wrong value for slave parameter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= check_slave_param.inc
|
||||||
|
--source include/end_include_file.inc
|
||||||
|
@@ -1,130 +0,0 @@
|
|||||||
#############################################################
|
|
||||||
#
|
|
||||||
# Author: Serge Kozlov <skozlov@mysql.com>
|
|
||||||
# Date: 03/11/2008
|
|
||||||
# Purpose: Set up circular replication based on schema
|
|
||||||
# A->B->C->D->A
|
|
||||||
#
|
|
||||||
# Notes:
|
|
||||||
# 1. --slave-num=3 must be added to *-master.opt file
|
|
||||||
# 2. Even the test uses new names for servers but file names
|
|
||||||
# of log files are still old:
|
|
||||||
# master_a -> master.[log|err]
|
|
||||||
# master_b -> slave.[log|err]
|
|
||||||
# master_c -> slave1.[log|err]
|
|
||||||
# master_d -> slave2.[log|err]
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
--source include/master-slave.inc
|
|
||||||
|
|
||||||
#
|
|
||||||
# Set up circular ring by schema A->B->C->D->A
|
|
||||||
#
|
|
||||||
|
|
||||||
--connection slave
|
|
||||||
STOP SLAVE;
|
|
||||||
RESET SLAVE;
|
|
||||||
|
|
||||||
# master a
|
|
||||||
--connection master
|
|
||||||
--disconnect master
|
|
||||||
connect (master_a,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
|
||||||
RESET MASTER;
|
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE;
|
|
||||||
--enable_warnings
|
|
||||||
RESET SLAVE;
|
|
||||||
SET auto_increment_increment = 4;
|
|
||||||
SET auto_increment_offset = 1;
|
|
||||||
let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
|
||||||
|
|
||||||
# master b
|
|
||||||
--connection slave
|
|
||||||
--disconnect slave
|
|
||||||
connect (master_b,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
|
||||||
RESET MASTER;
|
|
||||||
RESET SLAVE;
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_A_PORT $_binlog_file MASTER_A_LOG_FILE
|
|
||||||
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root',MASTER_LOG_FILE='$_binlog_file'
|
|
||||||
SET auto_increment_increment = 4;
|
|
||||||
SET auto_increment_offset = 2;
|
|
||||||
let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
|
||||||
|
|
||||||
# master c
|
|
||||||
--connection slave1
|
|
||||||
--disconnect slave1
|
|
||||||
connect (master_c,127.0.0.1,root,,test,$SLAVE_MYPORT1,);
|
|
||||||
RESET MASTER;
|
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE;
|
|
||||||
--enable_warnings
|
|
||||||
RESET SLAVE;
|
|
||||||
--replace_result $SLAVE_MYPORT MASTER_B_PORT $_binlog_file MASTER_B_LOG_FILE
|
|
||||||
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT,master_user='root',MASTER_LOG_FILE='$_binlog_file'
|
|
||||||
SET auto_increment_increment = 4;
|
|
||||||
SET auto_increment_offset = 3;
|
|
||||||
let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
|
||||||
|
|
||||||
# master d
|
|
||||||
connect (master_d,127.0.0.1,root,,test,$SLAVE_MYPORT2,);
|
|
||||||
RESET MASTER;
|
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE;
|
|
||||||
--enable_warnings
|
|
||||||
RESET SLAVE;
|
|
||||||
--replace_result $SLAVE_MYPORT1 MASTER_C_PORT $_binlog_file MASTER_C_LOG_FILE
|
|
||||||
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root',MASTER_LOG_FILE='$_binlog_file'
|
|
||||||
SET auto_increment_increment = 4;
|
|
||||||
SET auto_increment_offset = 4;
|
|
||||||
let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
|
||||||
|
|
||||||
# master a
|
|
||||||
--connection master_a
|
|
||||||
--replace_result $SLAVE_MYPORT2 MASTER_D_PORT $_binlog_file MASTER_D_LOG_FILE
|
|
||||||
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT2,master_user='root',MASTER_LOG_FILE='$_binlog_file'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check server_ids: they should be different
|
|
||||||
--connection master_a
|
|
||||||
let $_id_a= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1);
|
|
||||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
|
||||||
--connection master_b
|
|
||||||
let $_id_b= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1);
|
|
||||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
|
||||||
--connection master_c
|
|
||||||
let $_id_c= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1);
|
|
||||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
|
||||||
--connection master_d
|
|
||||||
let $_id_d= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1);
|
|
||||||
SHOW VARIABLES LIKE 'auto_increment_%';
|
|
||||||
--connection master_a
|
|
||||||
let $_compared_ids= (($_id_a <> $_id_b) AND ($_id_a <> $_id_c) AND ($_id_a <> $_id_d) AND ($_id_b <> $_id_c) AND ($_id_b <> $_id_d) AND ($_id_c <> $_id_d)) AS a;
|
|
||||||
let $_compared_ids_result= query_get_value(SELECT $_compared_ids, a, 1);
|
|
||||||
--echo $_compared_ids_result
|
|
||||||
|
|
||||||
# Start ring
|
|
||||||
--connection master_a
|
|
||||||
connect(slave,127.0.0.1,root,,test,$MASTER_MYPORT);
|
|
||||||
START SLAVE;
|
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
--disconnect slave
|
|
||||||
|
|
||||||
--connection master_b
|
|
||||||
connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT1);
|
|
||||||
START SLAVE;
|
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
--disconnect slave
|
|
||||||
|
|
||||||
--connection master_c
|
|
||||||
connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
|
|
||||||
START SLAVE;
|
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
--disconnect slave
|
|
||||||
|
|
||||||
--connection master_d
|
|
||||||
connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2);
|
|
||||||
START SLAVE;
|
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
--disconnect slave
|
|
||||||
|
|
@@ -1,23 +0,0 @@
|
|||||||
#############################################################
|
|
||||||
#
|
|
||||||
# Author: Serge Kozlov <skozlov@mysql.com>
|
|
||||||
# Date: 03/11/2008
|
|
||||||
# Purpose: Sync all hosts for circular replication based on
|
|
||||||
# schema A->B->C->D->A
|
|
||||||
#
|
|
||||||
# Notes: see include/circular_rpl_for_4_hosts_init.inc
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
|
|
||||||
# Make the full loop of sync
|
|
||||||
--connection master_a
|
|
||||||
--disable_query_log
|
|
||||||
--sync_slave_with_master master_b
|
|
||||||
--sync_slave_with_master master_c
|
|
||||||
--sync_slave_with_master master_d
|
|
||||||
--sync_slave_with_master master_a
|
|
||||||
--sync_slave_with_master master_b
|
|
||||||
--sync_slave_with_master master_c
|
|
||||||
--save_master_pos
|
|
||||||
--connection master_a
|
|
||||||
--enable_query_log
|
|
@@ -1,17 +1,28 @@
|
|||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# Clean up files create by setup_fake_relay_log.inc.
|
# Clean up files created by setup_fake_relay_log.inc.
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
# See setup_fake_relay_log.inc
|
# See setup_fake_relay_log.inc
|
||||||
|
|
||||||
--echo Cleaning up after setup_fake_relay_log.inc
|
--let $include_filename= cleanup_fake_relay_log.inc
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE SQL_THREAD;
|
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
|
# Assert that the fake relay log files are gone (RESET SLAVE should
|
||||||
|
# have removed them).
|
||||||
|
--let $file_does_not_exist= $_fake_relay_log
|
||||||
|
--source include/file_does_not_exist.inc
|
||||||
|
|
||||||
|
# Revert variables.
|
||||||
eval SET @@global.relay_log_purge= $_fake_relay_log_purge;
|
eval SET @@global.relay_log_purge= $_fake_relay_log_purge;
|
||||||
--enable_warnings
|
|
||||||
--enable_query_log
|
eval CHANGE MASTER TO MASTER_HOST = '$_fake_old_master_host';
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= cleanup_fake_relay_log.inc
|
||||||
|
--source include/end_include_file.inc
|
||||||
|
@@ -1,21 +0,0 @@
|
|||||||
# ==== Purpose ====
|
|
||||||
#
|
|
||||||
# Diff the output of a statement on master and slave
|
|
||||||
#
|
|
||||||
# ==== Usage =====
|
|
||||||
#
|
|
||||||
# let $diff_statement= SELECT * FROM t1 WHERE a < 100;
|
|
||||||
# source include/diff_master_slave.inc;
|
|
||||||
|
|
||||||
--echo source include/diff_master_slave.inc;
|
|
||||||
disable_query_log;
|
|
||||||
disable_result_log;
|
|
||||||
|
|
||||||
exec $MYSQL test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_master.out;
|
|
||||||
sync_slave_with_master;
|
|
||||||
exec $MYSQL_SLAVE test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_slave.out;
|
|
||||||
|
|
||||||
diff_files $MYSQLTEST_VARDIR/tmp/diff_master.out $MYSQLTEST_VARDIR/tmp/diff_slave.out;
|
|
||||||
|
|
||||||
enable_result_log;
|
|
||||||
enable_query_log;
|
|
@@ -1,35 +1,41 @@
|
|||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# Check if the two given tables (possibly residing on different
|
# Check if all tables in the given list are equal. The tables may have
|
||||||
# master/slave servers) are equal.
|
# different names, exist in different connections, and/or reside in
|
||||||
|
# different databases.
|
||||||
|
#
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
# The tables to check are given by the test language variables
|
# --let $diff_tables= [con1:][db1.]t1, [con2:][db2.]t2, ... , [conN:][dbN.]tN
|
||||||
# $diff_table_1 and $diff_table_2. They must be of the
|
# [--let $rpl_debug= 1]
|
||||||
# following form:
|
# --source include/diff_tables.inc
|
||||||
#
|
#
|
||||||
# [master:|slave:]database.table
|
# Parameters:
|
||||||
|
# $diff_tables
|
||||||
|
# Comma-separated list of tables to compare. Each table has the form
|
||||||
|
#
|
||||||
|
# [CONNECTION:][DATABASE.]table
|
||||||
|
#
|
||||||
|
# If CONNECTION is given, then that connection is used. If
|
||||||
|
# CONNECTION is not given, then the connection of the previous
|
||||||
|
# table is used (or the current connection, if this is the first
|
||||||
|
# table). If DATABASE is given, the table is read in that
|
||||||
|
# database. If DATABASE is not given, the table is read in the
|
||||||
|
# connection's current database.
|
||||||
|
#
|
||||||
|
# $rpl_debug
|
||||||
|
# See include/rpl_init.inc
|
||||||
#
|
#
|
||||||
# I.e., both database and table must be speicified. Optionally, you
|
|
||||||
# can prefix the name with 'master:' (to read the table on master) or
|
|
||||||
# with 'slave:' (to read the table on slave). If no prefix is given,
|
|
||||||
# reads the table from the current connection. If one of these
|
|
||||||
# variables has a prefix, both should have a prefix.
|
|
||||||
#
|
#
|
||||||
# ==== Side effects ====
|
# ==== Side effects ====
|
||||||
#
|
#
|
||||||
# - Prints "Comparing tables $diff_table_1 and $diff_tables_2".
|
# - Prints "include/diff_tables.inc [$diff_tables]".
|
||||||
#
|
#
|
||||||
# - If the tables are different, prints the difference in a
|
# - If the tables are different, prints the difference in a
|
||||||
# system-specific format (unified diff if supported) and generates
|
# system-specific format (unified diff if supported) and generates
|
||||||
# an error.
|
# an error.
|
||||||
#
|
#
|
||||||
# - If $diff_table_1 or $diff_table_2 begins with 'master:' or
|
|
||||||
# 'slave:', it will stay connected to one of those hosts after
|
|
||||||
# execution. The host is only guaranteed to remain unchanged if
|
|
||||||
# none of $diff_table_1 or $diff_table_2 begins with 'master:' or
|
|
||||||
# 'slave:'.
|
|
||||||
#
|
#
|
||||||
# ==== Bugs ====
|
# ==== Bugs ====
|
||||||
#
|
#
|
||||||
@@ -50,70 +56,135 @@
|
|||||||
# by character case.
|
# by character case.
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= diff_tables.inc [$diff_tables]
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
|
if (!$rpl_debug)
|
||||||
|
{
|
||||||
|
--disable_query_log
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Check sanity
|
||||||
|
if (`SELECT LOCATE(',', '$diff_tables') = 0`)
|
||||||
|
{
|
||||||
|
--die ERROR IN TEST: $diff_tables must contain at least two tables (separated by comma)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# ==== Save both tables to file ====
|
# ==== Save both tables to file ====
|
||||||
|
|
||||||
--echo Comparing tables $diff_table_1 and $diff_table_2
|
# Trim off whitespace
|
||||||
disable_query_log;
|
--let $_dt_tables= `SELECT REPLACE('$diff_tables', ' ', '')`
|
||||||
|
|
||||||
--error 0,1
|
# Iterate over all tables
|
||||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1
|
--let $_dt_outfile=
|
||||||
--error 0,1
|
--let $_dt_prev_outfile=
|
||||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2
|
while ($_dt_tables)
|
||||||
|
{
|
||||||
|
--let $_dt_table= `SELECT SUBSTRING_INDEX('$_dt_tables', ',', 1)`
|
||||||
|
--let $_dt_tables= `SELECT SUBSTRING('$_dt_tables', LENGTH('$_dt_table') + 2)`
|
||||||
|
|
||||||
|
# Parse connection, if any
|
||||||
let $_diff_table=$diff_table_2;
|
--let $_dt_colon_index= `SELECT LOCATE(':', '$_dt_table')`
|
||||||
let $_diff_i=2;
|
if ($_dt_colon_index)
|
||||||
while ($_diff_i) {
|
{
|
||||||
|
--let $_dt_connection= `SELECT SUBSTRING('$_dt_table', 1, $_dt_colon_index - 1)`
|
||||||
# Parse out any leading "master:" or "slave:" from the table specification
|
--let $_dt_table= `SELECT SUBSTRING('$_dt_table', $_dt_colon_index + 1)`
|
||||||
# and connect the appropriate server.
|
--let $rpl_connection_name= $_dt_connection
|
||||||
let $_pos= `SELECT LOCATE(':', '$_diff_table')`;
|
--source include/rpl_connection.inc
|
||||||
let $_diff_conn=`SELECT SUBSTR('$_diff_table', 1, $_pos-1)`;
|
|
||||||
if ($_diff_conn) {
|
|
||||||
let $_diff_table=`SELECT SUBSTR('$_diff_table', $_pos+1)`;
|
|
||||||
connection $_diff_conn;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sanity-check the input.
|
# Parse database name, if any
|
||||||
let $_diff_error= `SELECT '$_diff_table' NOT LIKE '_%._%'`;
|
--let $_dt_database_index= `SELECT LOCATE('.', '$_dt_table')`
|
||||||
if ($_diff_error) {
|
if ($_dt_database_index)
|
||||||
--echo !!!ERROR IN TEST: \$diff_table_$_diff_i='$_diff_table' is not in the form database.table
|
{
|
||||||
exit;
|
--let $_dt_database= `SELECT SUBSTRING('$_dt_table', 1, $_dt_database_index - 1)`
|
||||||
|
--let $_dt_table= `SELECT SUBSTRING('$_dt_table', $_dt_database_index + 1)`
|
||||||
|
}
|
||||||
|
if (!$_dt_database_index)
|
||||||
|
{
|
||||||
|
--let $_dt_database= `SELECT DATABASE()`
|
||||||
}
|
}
|
||||||
|
|
||||||
# We need the output files to be sorted (so that diff_files does not
|
if ($rpl_debug)
|
||||||
# think the files are different just because they are differently
|
{
|
||||||
# ordered). To this end, we first generate a query that sorts the
|
--echo con='$_dt_connection' db='$_dt_database' table='$_dt_table'
|
||||||
# table by all columns. Since ORDER BY accept column indices, we
|
--echo rest of tables='$_dt_tables'
|
||||||
# just generate a comma-separated list of all numbers from 1 to the
|
}
|
||||||
# number of columns in the table.
|
|
||||||
let $_diff_column_index=`SELECT MAX(ordinal_position)
|
# We need to sort the output files so that diff_files does not think
|
||||||
|
# the tables are different just because the rows are differently
|
||||||
|
# ordered. To this end, we first generate a string containing a
|
||||||
|
# comma-separated list of all column names. This is used in the
|
||||||
|
# ORDER BY clause of the following SELECT statement. We get the
|
||||||
|
# column names from INFORMATION_SCHEMA.COLUMNS, and we concatenate
|
||||||
|
# them with GROUP_CONCAT. Since GROUP_CONCAT is limited by the
|
||||||
|
# @@SESSION.group_concat_max_len, which is only 1024 by default, we
|
||||||
|
# first compute the total size of all columns and then increase this
|
||||||
|
# limit if needed. We restore the limit afterwards so as not to
|
||||||
|
# interfere with the test case.
|
||||||
|
|
||||||
|
# Compute length of ORDER BY clause.
|
||||||
|
let $_dt_order_by_length=
|
||||||
|
`SELECT SUM(LENGTH(column_name) + 3) FROM information_schema.columns
|
||||||
|
WHERE table_schema = '$_dt_database' AND table_name = '$_dt_table'`;
|
||||||
|
if (!$_dt_order_by_length)
|
||||||
|
{
|
||||||
|
--echo ERROR IN TEST: table $_dt_database.$_dt_table not found in INFORMATION_SCHEMA.COLUMNS. Did you misspell it?
|
||||||
|
--die ERROR IN TEST: table not found in INFORMATION_SCHEMA. Did you misspell it?
|
||||||
|
}
|
||||||
|
--let $_dt_old_group_concat_max_len=
|
||||||
|
# Increase group_concat_max_len if needed.
|
||||||
|
if (`SELECT $_dt_order_by_length > @@SESSION.group_concat_max_len`)
|
||||||
|
{
|
||||||
|
--let $_dt_old_group_concat_max_len= `SELECT @@SESSION.group_concat_max_len`
|
||||||
|
--eval SET SESSION group_concat_max_len = $_dt_order_by_length;
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # increasing group_concat_max_len from $_dt_old_group_concat_max_len to $_dt_order_by_length
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Generate ORDER BY clause.
|
||||||
|
# It would be better to do GROUP_CONCAT(CONCAT('`', column_name, '`')) but
|
||||||
|
# BUG#58087 prevents us from returning strings that begin with backticks.
|
||||||
|
let $_dt_column_list=
|
||||||
|
`SELECT GROUP_CONCAT(column_name ORDER BY ORDINAL_POSITION SEPARATOR '`,`')
|
||||||
FROM information_schema.columns
|
FROM information_schema.columns
|
||||||
WHERE CONCAT(table_schema, '.', table_name) =
|
WHERE table_schema = '$_dt_database' AND table_name = '$_dt_table'`;
|
||||||
'$_diff_table'`;
|
# Restore group_concat_max_len.
|
||||||
let $_diff_column_list=$_diff_column_index;
|
if ($_dt_old_group_concat_max_len)
|
||||||
dec $_diff_column_index;
|
{
|
||||||
while ($_diff_column_index) {
|
--let $_dt_dummy= `SET SESSION group_concat_max_len = $_dt_old_group_concat_max_len
|
||||||
let $_diff_column_list=$_diff_column_index, $_diff_column_list;
|
}
|
||||||
dec $_diff_column_index;
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo using ORDER BY clause '`$_dt_column_list`'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now that we have the comma-separated list of columns, we can write
|
# Now that we have the comma-separated list of columns, we can write
|
||||||
# the table to a file.
|
# the table to a file.
|
||||||
eval SELECT * FROM $_diff_table ORDER BY $_diff_column_list
|
--let $_dt_outfile= `SELECT @@datadir`
|
||||||
INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/diff_table_$_diff_i';
|
--let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table
|
||||||
|
eval SELECT * FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list` INTO OUTFILE '$_dt_outfile';
|
||||||
|
|
||||||
# Do the same for $diff_table_1.
|
# Compare files.
|
||||||
dec $_diff_i;
|
if ($_dt_prev_outfile)
|
||||||
let $_diff_table=$diff_table_1;
|
{
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo # diffing $_dt_prev_outfile vs $_dt_outfile
|
||||||
|
}
|
||||||
|
--diff_files $_dt_prev_outfile $_dt_outfile
|
||||||
|
# Remove previous outfile. Keep current file for comparison with next table.
|
||||||
|
--remove_file $_dt_prev_outfile
|
||||||
|
}
|
||||||
|
--let $_dt_prev_outfile= $_dt_outfile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--remove_file $_dt_prev_outfile
|
||||||
|
|
||||||
# ==== Compare the generated files ====
|
|
||||||
|
|
||||||
diff_files $MYSQLTEST_VARDIR/tmp/diff_table_1 $MYSQLTEST_VARDIR/tmp/diff_table_2;
|
--let $include_filename= diff_tables.inc [$diff_tables]
|
||||||
|
--source include/end_include_file.inc
|
||||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1
|
|
||||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2
|
|
||||||
|
|
||||||
enable_query_log;
|
|
||||||
|
79
mysql-test/include/end_include_file.inc
Normal file
79
mysql-test/include/end_include_file.inc
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# See include/begin_include_file.inc
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# # At the end of include/my_file.inc:
|
||||||
|
# --let $include_filename= my_file.inc
|
||||||
|
# [--let $skip_restore_connection= 1]
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/begin_include_file.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $include_filename
|
||||||
|
# Name of file that sources this file.
|
||||||
|
#
|
||||||
|
# $skip_restore_connection
|
||||||
|
# By default, this script restores the connection that was active
|
||||||
|
# when begin_include_file.inc was sourced. If
|
||||||
|
# $skip_restore_connection is set, then this step is skipped and
|
||||||
|
# end_include_file.inc leaves the connection as it was before
|
||||||
|
# end_include_file.inc was sourced.
|
||||||
|
|
||||||
|
--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_warnings', 1, 1)`
|
||||||
|
--let $_include_file_enabled_warnings= `SELECT SUBSTRING('$_include_file_enabled_warnings', 2)`
|
||||||
|
if ($_tmp) {
|
||||||
|
--enable_warnings
|
||||||
|
}
|
||||||
|
if (!$_tmp) {
|
||||||
|
--disable_warnings
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_query_log', 1, 1)`
|
||||||
|
--let $_include_file_enabled_query_log= `SELECT SUBSTRING('$_include_file_enabled_query_log', 2)`
|
||||||
|
if ($_tmp) {
|
||||||
|
--enable_query_log
|
||||||
|
}
|
||||||
|
if (!$_tmp) {
|
||||||
|
--disable_query_log
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_result_log', 1, 1)`
|
||||||
|
--let $_include_file_enabled_result_log= `SELECT SUBSTRING('$_include_file_enabled_result_log', 2)`
|
||||||
|
if ($_tmp) {
|
||||||
|
--enable_result_log
|
||||||
|
}
|
||||||
|
if (!$_tmp) {
|
||||||
|
--disable_result_log
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_abort_on_error', 1, 1)`
|
||||||
|
--let $_include_file_enabled_abort_on_error= `SELECT SUBSTRING('$_include_file_enabled_abort_on_error', 2)`
|
||||||
|
if ($_tmp) {
|
||||||
|
--enable_abort_on_error
|
||||||
|
}
|
||||||
|
if (!$_tmp) {
|
||||||
|
--disable_abort_on_error
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_include_file_rpl_connection_name= `SELECT SUBSTRING_INDEX('$_include_file_connection', ',', 1)`
|
||||||
|
--let $_include_file_connection= `SELECT SUBSTRING('$_include_file_connection', LENGTH('$_include_file_rpl_connection_name') + 2)`
|
||||||
|
if (!$skip_restore_connection)
|
||||||
|
{
|
||||||
|
--let $rpl_connection_name= $_include_file_rpl_connection_name
|
||||||
|
--source include/rpl_connection.inc
|
||||||
|
}
|
||||||
|
--let $skip_restore_connection= 0
|
||||||
|
|
||||||
|
|
||||||
|
--dec $_include_file_depth
|
||||||
|
--let $_include_file_indent= `SELECT REPEAT('.', $_include_file_depth)`
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo $_include_file_indent==== END include/$include_filename ====
|
||||||
|
--echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLED_WARNINGS' qlog='$ENABLED_QUERY_LOG' rlog='$ENABLED_RESULT_LOG' aborterr='$ENABLED_ABORT_ON_ERROR'
|
||||||
|
}
|
||||||
|
--let $include_filename=
|
17
mysql-test/include/file_does_not_exist.inc
Normal file
17
mysql-test/include/file_does_not_exist.inc
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Checks that a given file does not exist. If the file exists, the
|
||||||
|
# test fails.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --let $file_does_not_exist= /path/to/file
|
||||||
|
# --source include/file_does_not_exist.inc
|
||||||
|
|
||||||
|
# Will fail if file exists.
|
||||||
|
--write_file $file_does_not_exist
|
||||||
|
tmp
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Remove file again.
|
||||||
|
--remove_file $file_does_not_exist
|
17
mysql-test/include/force_restart.inc
Normal file
17
mysql-test/include/force_restart.inc
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Tell mtr that all servers must be restarted after the test has
|
||||||
|
# finished.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --source include/force_restart.inc
|
||||||
|
#
|
||||||
|
# ==== See also ====
|
||||||
|
#
|
||||||
|
# include/force_restart_if_skipped.inc
|
||||||
|
|
||||||
|
--let $_force_restart_datadir= `SELECT @@datadir`
|
||||||
|
--append_file $_force_restart_datadir/mtr/force_restart
|
||||||
|
1
|
||||||
|
EOF
|
17
mysql-test/include/force_restart_if_skipped.inc
Normal file
17
mysql-test/include/force_restart_if_skipped.inc
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Tell mtr that all servers must be restarted in case the test is
|
||||||
|
# skipped.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --source include/force_restart_if_skipped.inc
|
||||||
|
#
|
||||||
|
# ==== See also ====
|
||||||
|
#
|
||||||
|
# include/force_restart.inc
|
||||||
|
|
||||||
|
--let $_force_restart_datadir= `SELECT @@datadir`
|
||||||
|
--append_file $_force_restart_datadir/mtr/force_restart_if_skipped
|
||||||
|
1
|
||||||
|
EOF
|
@@ -1,4 +1,4 @@
|
|||||||
disable_query_log;
|
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
|
||||||
--require r/true.require
|
{
|
||||||
select (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` from information_schema.engines where engine = 'innodb';
|
--skip Test requires InnoDB.
|
||||||
enable_query_log;
|
}
|
||||||
|
21
mysql-test/include/io_thd_fault_injection.inc
Normal file
21
mysql-test/include/io_thd_fault_injection.inc
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#
|
||||||
|
# Takes the flag as an argument:
|
||||||
|
# -- let $io_thd_injection_fault_flag=+d,fault_injection_new_file_rotate_event
|
||||||
|
# -- source include/io_thd_fault_injection.inc
|
||||||
|
#
|
||||||
|
|
||||||
|
SET @old_debug=@@global.debug;
|
||||||
|
-- disable_warnings
|
||||||
|
-- source include/stop_slave.inc
|
||||||
|
-- enable_warnings
|
||||||
|
-- eval SET GLOBAL debug="+d,$io_thd_injection_fault_flag"
|
||||||
|
|
||||||
|
START SLAVE io_thread;
|
||||||
|
-- source include/wait_for_slave_io_error.inc
|
||||||
|
|
||||||
|
-- eval SET GLOBAL debug="-d,$io_thd_injection_fault_flag"
|
||||||
|
SET GLOBAL debug=@old_debug;
|
||||||
|
|
||||||
|
# restart because slave is in bad shape
|
||||||
|
--let $rpl_server_number= 2
|
||||||
|
--source include/rpl_restart_server.inc
|
@@ -9,19 +9,19 @@
|
|||||||
# connection <CONNECTION>;
|
# connection <CONNECTION>;
|
||||||
# let $connection_name=<CONNECTION>
|
# let $connection_name=<CONNECTION>
|
||||||
# let $connection_id=`SELECT CONNECTION_ID()`;
|
# let $connection_id=`SELECT CONNECTION_ID()`;
|
||||||
# let $diff_statement=<SQL COMMAND>;
|
# let $rpl_diff_statement=<SQL COMMAND>;
|
||||||
# send <SQL COMMAND>;
|
# send <SQL COMMAND>;
|
||||||
# source include/kill_query_and_diff_master_slave.inc;
|
# source include/kill_query_and_diff_master_slave.inc;
|
||||||
#
|
#
|
||||||
# Note: <CONNECTION> must not be 'master'.
|
# Note: <CONNECTION> must not be 'master'.
|
||||||
#
|
#
|
||||||
# See also kill_query.inc and diff_master_slave.inc for more
|
# See also kill_query.inc and rpl_diff.inc for more
|
||||||
# information
|
# information
|
||||||
|
|
||||||
source include/kill_query.inc;
|
source include/kill_query.inc;
|
||||||
|
|
||||||
# Release the debug lock if used, so that the statements in
|
# Release the debug lock if used, so that the statements in
|
||||||
# diff_master_slave.inc will not be blocked.
|
# rpl_diff.inc will not be blocked.
|
||||||
connection master;
|
connection master;
|
||||||
disable_query_log;
|
disable_query_log;
|
||||||
disable_result_log;
|
disable_result_log;
|
||||||
@@ -32,7 +32,7 @@ if ($debug_lock)
|
|||||||
enable_result_log;
|
enable_result_log;
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
|
||||||
source include/diff_master_slave.inc;
|
--source include/rpl_diff.inc
|
||||||
|
|
||||||
# Acquire the debug lock again if used
|
# Acquire the debug lock again if used
|
||||||
connection master;
|
connection master;
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
--connection master
|
|
||||||
--sync_slave_with_master
|
|
||||||
--connection slave
|
|
||||||
--disable_query_log
|
|
||||||
STOP SLAVE;
|
|
||||||
--enable_query_log
|
|
@@ -1,75 +0,0 @@
|
|||||||
# Reset the master and the slave to start fresh.
|
|
||||||
#
|
|
||||||
# It is necessary to execute RESET MASTER and RESET SLAVE on both
|
|
||||||
# master and slave since the replication setup might be circular.
|
|
||||||
#
|
|
||||||
# Since we expect STOP SLAVE to produce a warning as the slave is
|
|
||||||
# stopped (the server was started with skip-slave-start), we disable
|
|
||||||
# warnings when doing STOP SLAVE.
|
|
||||||
#
|
|
||||||
# $no_change_master If true, no change master will be done nor any reset slave.
|
|
||||||
# This is to avoid touching the relay-log.info file allowing
|
|
||||||
# the test to create one itself.
|
|
||||||
# $skip_slave_start If true, the slave will not be started
|
|
||||||
|
|
||||||
connection slave;
|
|
||||||
|
|
||||||
#we expect STOP SLAVE to produce a warning as the slave is stopped
|
|
||||||
#(the server was started with skip-slave-start)
|
|
||||||
--disable_warnings
|
|
||||||
stop slave;
|
|
||||||
--disable_query_log
|
|
||||||
if (!$no_change_master) {
|
|
||||||
eval CHANGE MASTER TO MASTER_USER='root',
|
|
||||||
MASTER_CONNECT_RETRY=1,
|
|
||||||
MASTER_HOST='127.0.0.1',
|
|
||||||
MASTER_PORT=$MASTER_MYPORT;
|
|
||||||
}
|
|
||||||
--enable_query_log
|
|
||||||
source include/wait_for_slave_to_stop.inc;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
connection master;
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
use test;
|
|
||||||
--enable_query_log
|
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
||||||
--enable_warnings
|
|
||||||
reset master;
|
|
||||||
|
|
||||||
--disable_query_log
|
|
||||||
if (!$no_change_master) {
|
|
||||||
reset slave;
|
|
||||||
}
|
|
||||||
--enable_query_log
|
|
||||||
connection slave;
|
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
# the first RESET SLAVE may produce a warning about non-existent
|
|
||||||
# 'ndb_apply_status' table, because this table is created
|
|
||||||
# asynchronously at the server startup and may not exist yet
|
|
||||||
# if RESET SLAVE comes too soon after the server startup
|
|
||||||
if (!$no_change_master) {
|
|
||||||
reset slave;
|
|
||||||
}
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
# Clean up old test tables
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
--disable_query_log
|
|
||||||
#eval CHANGE MASTER TO MASTER_USER='root',
|
|
||||||
# MASTER_CONNECT_RETRY=1,
|
|
||||||
# MASTER_HOST='127.0.0.1',
|
|
||||||
# MASTER_PORT=$MASTER_MYPORT;
|
|
||||||
reset master;
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
if (!$skip_slave_start) {
|
|
||||||
start slave;
|
|
||||||
source include/wait_for_slave_to_start.inc;
|
|
||||||
}
|
|
||||||
|
|
@@ -1,19 +1,63 @@
|
|||||||
# Replication tests need binlog
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# $skip_slave_start If true, the slave will not be started
|
# Configure two servers to be replication master and slave.
|
||||||
source include/have_log_bin.inc;
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# [--let $rpl_server_count= N]
|
||||||
|
# [--let $rpl_check_server_ids= 1]
|
||||||
|
# [--let $rpl_skip_reset_master_and_slave= 1]
|
||||||
|
# [--let $rpl_skip_change_master= 1]
|
||||||
|
# [--let $rpl_skip_start_slave= 1]
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# [--let $slave_timeout= NUMBER]
|
||||||
|
# --source include/master-slave.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $rpl_check_server_ids, $rpl_skip_reset_master_and_slave,
|
||||||
|
# $rpl_skip_change_master, $rpl_skip_start_slave, $rpl_debug,
|
||||||
|
# $slave_timeout
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
#
|
||||||
|
# $rpl_server_count
|
||||||
|
# By default, two servers are configured. You can configure more
|
||||||
|
# servers (servers 3, 4, etc are neither masters nor slaves) by
|
||||||
|
# setting this variable. See also include/rpl_init.inc
|
||||||
|
|
||||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
|
||||||
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
|
||||||
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
|
||||||
connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
|
||||||
|
|
||||||
-- source include/master-slave-reset.inc
|
--let $include_filename= master-slave.inc
|
||||||
|
if ($rpl_server_count)
|
||||||
if (!$skip_slave_start) {
|
{
|
||||||
connection master;
|
--let $include_filename= master-slave.inc [rpl_server_count=$rpl_server_count]
|
||||||
sync_slave_with_master;
|
|
||||||
}
|
}
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
# Set the default connection to 'master'
|
|
||||||
connection master;
|
--let $rpl_topology= 1->2
|
||||||
|
--source include/rpl_init.inc
|
||||||
|
|
||||||
|
--let $rpl_connection_name= master
|
||||||
|
--let $rpl_server_number= 1
|
||||||
|
--source include/rpl_connect.inc
|
||||||
|
|
||||||
|
--let $rpl_connection_name= master1
|
||||||
|
--let $rpl_server_number= 1
|
||||||
|
--source include/rpl_connect.inc
|
||||||
|
|
||||||
|
--let $rpl_connection_name= slave
|
||||||
|
--let $rpl_server_number= 2
|
||||||
|
--source include/rpl_connect.inc
|
||||||
|
|
||||||
|
--let $rpl_connection_name= slave1
|
||||||
|
--let $rpl_server_number= 2
|
||||||
|
--source include/rpl_connect.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= master-slave.inc
|
||||||
|
--source include/end_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
|
# Set the default connection to 'master'. Do this after
|
||||||
|
# end_include_file.inc, so that it gets printed to the query log.
|
||||||
|
--let $rpl_connection_name= master
|
||||||
|
--source include/rpl_connection.inc
|
||||||
|
@@ -57,13 +57,3 @@ BEGIN
|
|||||||
mysql.user;
|
mysql.user;
|
||||||
|
|
||||||
END||
|
END||
|
||||||
|
|
||||||
--
|
|
||||||
-- Procedure used by test case used to force all
|
|
||||||
-- servers to restart after testcase and thus skipping
|
|
||||||
-- check test case after test
|
|
||||||
--
|
|
||||||
CREATE DEFINER=root@localhost PROCEDURE force_restart()
|
|
||||||
BEGIN
|
|
||||||
SELECT 1 INTO OUTFILE 'force_restart';
|
|
||||||
END||
|
|
||||||
|
@@ -41,8 +41,7 @@ eval ALTER TABLE $table_name RENAME to $orig_table_name;
|
|||||||
--echo # Compare original and recreated tables
|
--echo # Compare original and recreated tables
|
||||||
--echo # Recreated table: $table_name
|
--echo # Recreated table: $table_name
|
||||||
--echo # Original table: $orig_table_name
|
--echo # Original table: $orig_table_name
|
||||||
let $diff_table_1 = $table_name;
|
let $diff_tables = $table_name, $orig_table_name;
|
||||||
let $diff_table_2 = $orig_table_name;
|
|
||||||
--source include/diff_tables.inc
|
--source include/diff_tables.inc
|
||||||
--echo # Cleanup
|
--echo # Cleanup
|
||||||
--remove_file $mysqldumpfile
|
--remove_file $mysqldumpfile
|
||||||
|
@@ -1,10 +1,4 @@
|
|||||||
# Replication tests need binlog
|
--source include/master-slave.inc
|
||||||
source include/have_log_bin.inc;
|
|
||||||
|
|
||||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
|
||||||
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
|
||||||
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
|
||||||
connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
# Check that server is compiled and started with support for NDB
|
# Check that server is compiled and started with support for NDB
|
||||||
@@ -14,7 +8,5 @@ select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schem
|
|||||||
--source include/ndb_not_readonly.inc
|
--source include/ndb_not_readonly.inc
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
|
||||||
-- source include/master-slave-reset.inc
|
|
||||||
|
|
||||||
# Set the default connection to 'master'
|
# Set the default connection to 'master'
|
||||||
connection master;
|
connection master;
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#############################################################
|
# ==== Purpose ====
|
||||||
# Author: Serge Kozlov <skozlov@mysql.com>
|
#
|
||||||
# Date: 03/17/2008
|
# Set up circular cluster replication where each
|
||||||
# Purpose: Set up circular cluster replication where each
|
|
||||||
# cluster has two mysqlds and replication directions are
|
# cluster has two mysqlds and replication directions are
|
||||||
# following:
|
# following:
|
||||||
# master ---> slave
|
# master ---> slave
|
||||||
@@ -9,128 +8,60 @@
|
|||||||
# cluster A cluster B
|
# cluster A cluster B
|
||||||
# \ /
|
# \ /
|
||||||
# master1 <--- slave1
|
# master1 <--- slave1
|
||||||
#############################################################
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# [--let $rpl_server_count= N]
|
||||||
|
# [--let $rpl_skip_check_server_ids= 1]
|
||||||
|
# [--let $rpl_skip_reset_master_and_slave= 1]
|
||||||
|
# [--let $rpl_skip_change_master= 1]
|
||||||
|
# [--let $rpl_skip_start_slave= 1]
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# [--let $slave_timeout= NUMBER]
|
||||||
|
# --source include/ndb_master-slave_2ch.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $rpl_server_count, $rpl_skip_check_server_ids,
|
||||||
|
# $rpl_skip_reset_master_and_slave, $rpl_skip_change_master,
|
||||||
|
# $rpl_skip_start_slave, $rpl_debug, $slave_timeout
|
||||||
|
# See include/master-slave.inc
|
||||||
|
|
||||||
--source include/have_log_bin.inc
|
--let $rpl_topology= 1->2,4->3
|
||||||
|
--let $rpl_skip_check_server_ids= 1
|
||||||
|
--source include/rpl_init.inc
|
||||||
|
|
||||||
# Make connections to mysqlds
|
# Make connections to mysqlds
|
||||||
|
|
||||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
--let $rpl_connection_name= master
|
||||||
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT1,);
|
--let $rpl_server_number= 1
|
||||||
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
--source include/rpl_connect.inc
|
||||||
connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT1,);
|
|
||||||
|
|
||||||
# Check that all mysqld compiled with ndb support
|
--let $rpl_connection_name= master1
|
||||||
|
--let $rpl_server_number= 1
|
||||||
|
--source include/rpl_connect.inc
|
||||||
|
|
||||||
--connection master
|
--let $rpl_connection_name= slave
|
||||||
--disable_query_log
|
--let $rpl_server_number= 2
|
||||||
--require r/true.require
|
--source include/rpl_connect.inc
|
||||||
SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster';
|
|
||||||
|
--let $rpl_connection_name= slave1
|
||||||
|
--let $rpl_server_number= 2
|
||||||
|
--source include/rpl_connect.inc
|
||||||
|
|
||||||
|
|
||||||
|
# Check that all mysqld are compiled with ndb support
|
||||||
|
--let $_rpl_server= 4
|
||||||
|
while ($_rpl_server)
|
||||||
|
{
|
||||||
|
--connection server_$_rpl_server
|
||||||
|
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'ndbcluster' AND (support = 'YES' OR support = 'DEFAULT')`)
|
||||||
|
{
|
||||||
|
--skip Test requires NDB.
|
||||||
|
}
|
||||||
--source include/ndb_not_readonly.inc
|
--source include/ndb_not_readonly.inc
|
||||||
--enable_query_log
|
--dec $_rpl_server
|
||||||
|
}
|
||||||
--connection master1
|
|
||||||
--disable_query_log
|
|
||||||
--require r/true.require
|
|
||||||
SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster';
|
|
||||||
--source include/ndb_not_readonly.inc
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
--connection slave
|
|
||||||
--disable_query_log
|
|
||||||
--require r/true.require
|
|
||||||
SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster';
|
|
||||||
--source include/ndb_not_readonly.inc
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
--connection slave1
|
|
||||||
--disable_query_log
|
|
||||||
--require r/true.require
|
|
||||||
SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster';
|
|
||||||
--source include/ndb_not_readonly.inc
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
# Stop slaves
|
|
||||||
|
|
||||||
--connection master
|
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE;
|
|
||||||
--wait_for_slave_to_stop
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
--connection master1
|
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE;
|
|
||||||
--wait_for_slave_to_stop
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
--connection slave
|
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE;
|
|
||||||
--wait_for_slave_to_stop
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
--connection slave1
|
|
||||||
--disable_warnings
|
|
||||||
STOP SLAVE;
|
|
||||||
--wait_for_slave_to_stop
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
# Reset masters
|
|
||||||
|
|
||||||
--connection master
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
USE test;
|
|
||||||
--enable_query_log
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
||||||
--enable_warnings
|
|
||||||
RESET MASTER;
|
|
||||||
|
|
||||||
--connection master1
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
USE test;
|
|
||||||
--enable_query_log
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
||||||
--enable_warnings
|
|
||||||
RESET MASTER;
|
|
||||||
|
|
||||||
--connection slave
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
USE test;
|
|
||||||
--enable_query_log
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
||||||
--enable_warnings
|
|
||||||
RESET MASTER;
|
|
||||||
|
|
||||||
--connection slave1
|
|
||||||
--disable_warnings
|
|
||||||
--disable_query_log
|
|
||||||
USE test;
|
|
||||||
--enable_query_log
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
||||||
--enable_warnings
|
|
||||||
RESET MASTER;
|
|
||||||
|
|
||||||
# Start slaves
|
|
||||||
|
|
||||||
--connection slave
|
|
||||||
RESET SLAVE;
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
|
||||||
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root'
|
|
||||||
START SLAVE;
|
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
|
|
||||||
--connection master1
|
|
||||||
RESET SLAVE;
|
|
||||||
--replace_result $SLAVE_MYPORT1 SLAVE_MYPORT1
|
|
||||||
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root'
|
|
||||||
START SLAVE;
|
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
|
|
||||||
|
|
||||||
# Set the default connection to 'master' (cluster A)
|
# Set the default connection to 'master' (cluster A)
|
||||||
connection master;
|
connection master;
|
||||||
|
|
||||||
|
@@ -2,6 +2,9 @@
|
|||||||
#
|
#
|
||||||
# wait for server to connect properly to cluster
|
# wait for server to connect properly to cluster
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
set @saved_log = @@sql_log_bin;
|
set @saved_log = @@sql_log_bin;
|
||||||
set sql_log_bin = 0;
|
set sql_log_bin = 0;
|
||||||
--error 0,ER_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG,ER_KEY_NOT_FOUND
|
--error 0,ER_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG,ER_KEY_NOT_FOUND
|
||||||
@@ -25,6 +28,9 @@ while ($mysql_errno)
|
|||||||
}
|
}
|
||||||
delete from mysql.ndb_apply_status where server_id=0;
|
delete from mysql.ndb_apply_status where server_id=0;
|
||||||
set sql_log_bin = @saved_log;
|
set sql_log_bin = @saved_log;
|
||||||
|
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
#
|
#
|
||||||
# connected
|
# connected
|
||||||
#
|
#
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
--echo **** Resetting master and slave ****
|
|
||||||
connection slave;
|
|
||||||
source include/stop_slave.inc;
|
|
||||||
RESET SLAVE;
|
|
||||||
connection master;
|
|
||||||
RESET MASTER;
|
|
||||||
connection slave;
|
|
||||||
source include/start_slave.inc;
|
|
@@ -1,14 +1,24 @@
|
|||||||
|
|
||||||
|
if ($rpl_inited)
|
||||||
|
{
|
||||||
|
if (!$allow_rpl_inited)
|
||||||
|
{
|
||||||
|
--die ERROR IN TEST: When using the replication test framework (master-slave.inc, rpl_init.inc etc), use rpl_restart_server.inc instead of restart_mysqld.inc. If you know what you are doing and you really have to use restart_mysqld.inc, set allow_rpl_inited=1 before you source restart_mysqld.inc
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||||
# it until it's told to
|
# it until it's told to
|
||||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--let $_server_id= `SELECT @@server_id`
|
||||||
|
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||||
|
--exec echo "wait" > $_expect_file_name
|
||||||
|
|
||||||
# Send shutdown to the connected server and give
|
# Send shutdown to the connected server and give
|
||||||
# it 10 seconds to die before zapping it
|
# it 10 seconds to die before zapping it
|
||||||
shutdown_server 10;
|
shutdown_server 10;
|
||||||
|
|
||||||
# Write file to make mysql-test-run.pl start up the server again
|
# Write file to make mysql-test-run.pl start up the server again
|
||||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--exec echo "restart" > $_expect_file_name
|
||||||
|
|
||||||
# Turn on reconnect
|
# Turn on reconnect
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
|
247
mysql-test/include/rpl_change_topology.inc
Normal file
247
mysql-test/include/rpl_change_topology.inc
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Changes replication topology. This file is normally sourced from
|
||||||
|
# include/rpl_init.inc, but test cases can also source it if they
|
||||||
|
# need to change topology after they have sourced include/rpl_init.inc
|
||||||
|
#
|
||||||
|
# This file sets up variables needed by include/rpl_sync.inc and many
|
||||||
|
# other replication scripts in the include/ directory. It also issues
|
||||||
|
# CHANGE MASTER on all servers where the configuration changes from
|
||||||
|
# what it was before. It does not issue START SLAVE (use
|
||||||
|
# include/rpl_start_slaves.inc for that).
|
||||||
|
#
|
||||||
|
# Note: it is not currently possible to change the number of servers
|
||||||
|
# after the rpl_init.inc, without first calling rpl_end.inc. So the
|
||||||
|
# test has to set $rpl_server_count to the total number of servers
|
||||||
|
# that the test uses, before it sources include/rpl_init.inc. After
|
||||||
|
# that, $rpl_server_count must not change until after next time the
|
||||||
|
# test sources include/rpl_end.inc.
|
||||||
|
#
|
||||||
|
# Note: Since this script issues CHANGE MASTER, the test case must
|
||||||
|
# ensure that all slaves where the configuration changes have stopped
|
||||||
|
# both the IO thread and the SQL thread before this script is sourced.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# [--let $rpl_server_count= 7]
|
||||||
|
# --let $rpl_topology= 1->2->3->1->4, 2->5, 6->7
|
||||||
|
# [--let $rpl_skip_change_master= 1]
|
||||||
|
# [--let $rpl_master_log_file= 1:master-bin.000001,3:master-bin.000003]
|
||||||
|
# [--let $rpl_master_log_pos= 1:4711,3:107]
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/rpl_change_topology.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $rpl_master_log_file
|
||||||
|
# By default, CHANGE MASTER is executed with MASTER_LOG_FILE set
|
||||||
|
# to the name of the last binlog file on the master (retrieved by
|
||||||
|
# executing SHOW MASTER STATUS). This variable can be set to
|
||||||
|
# specify another filename. This variable should be a
|
||||||
|
# comma-separated list of the following form:
|
||||||
|
#
|
||||||
|
# SERVER_NUMBER_1:FILE_NAME_1,SERVER_NUMBER_2:FILE_NAME_2,...
|
||||||
|
#
|
||||||
|
# Before CHANGE MASTER is executed on server N, this script checks
|
||||||
|
# if $rpl_master_log_file contains the text N:FILE_NAME. If it
|
||||||
|
# does, then MASTER_LOG_FILE is set to FILE_NAME. Otherwise,
|
||||||
|
# MASTER_LOG_FILE is set to the last binlog on the master. For
|
||||||
|
# example, to specify that server_1 should start replicate from
|
||||||
|
# master-bin.000007 and server_5 should start replicate from
|
||||||
|
# master-bin.012345, do:
|
||||||
|
# --let $rpl_master_log_file= 1:master-bin.000007,5:master-bin.012345
|
||||||
|
#
|
||||||
|
# $rpl_master_log_pos
|
||||||
|
# By default, CHANGE MASTER is executed without specifying the
|
||||||
|
# MASTER_LOG_POS parameter. This variable can be set to set a
|
||||||
|
# specific position. It has the same form as $rpl_master_log_file
|
||||||
|
# (see above). For example, to specify that server_3 should start
|
||||||
|
# replicate from position 4711 of its master, do:
|
||||||
|
# --let $rpl_master_log_pos= 3:4711
|
||||||
|
#
|
||||||
|
# $rpl_server_count, $rpl_topology, $rpl_debug, $rpl_skip_change_master
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Internal variables configured by this file ====
|
||||||
|
#
|
||||||
|
# This file sets up the following variables, which are used by other
|
||||||
|
# low-level replication files such as:
|
||||||
|
# include/rpl_sync.inc
|
||||||
|
# include/rpl_start_slaves.inc
|
||||||
|
# include/rpl_stop_slaves.inc
|
||||||
|
# include/rpl_end.inc
|
||||||
|
#
|
||||||
|
# $rpl_server_count_length:
|
||||||
|
# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10,
|
||||||
|
# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count <
|
||||||
|
# 100, then $rpl_server_count_length = 2, etc.
|
||||||
|
#
|
||||||
|
# $rpl_master_list
|
||||||
|
# Set to a string consisting of $rpl_server_count numbers, each one
|
||||||
|
# whitespace-padded to $rpl_server_count_length characters. If
|
||||||
|
# server N is a slave, then the N'th number is the master of server
|
||||||
|
# N. If server N is not a slave, then the N'th number is just spaces
|
||||||
|
# (so in fact it is not a number). For example, if $rpl_topology is
|
||||||
|
# '1->2,2->3,3->1,2->4,5->6', then $rpl_master_list is '3122 6'.
|
||||||
|
#
|
||||||
|
# $rpl_sync_chain_dirty
|
||||||
|
# This variable is set to 1. This tells include/rpl_sync.inc to
|
||||||
|
# compute a new value for $rpl_sync_chain next time that
|
||||||
|
# include/rpl_sync.inc is sourced. See
|
||||||
|
# include/rpl_generate_sync_chain.inc and include/rpl_sync.inc for
|
||||||
|
# details.
|
||||||
|
|
||||||
|
|
||||||
|
# Remove whitespace from $rpl_topology
|
||||||
|
--let $rpl_topology= `SELECT REPLACE('$rpl_topology', ' ', '')`
|
||||||
|
|
||||||
|
--let $include_filename= rpl_change_topology.inc [new topology=$rpl_topology]
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo ---- Check input ----
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (`SELECT '$rpl_topology' = '' OR '$rpl_server_count' = ''`)
|
||||||
|
{
|
||||||
|
--die You must set $rpl_topology and $rpl_server_count before you source rpl_change_topology.inc. If you really want to change to the empty topology, set $rpl_topology= none
|
||||||
|
}
|
||||||
|
--let $_rpl_topology= $rpl_topology
|
||||||
|
if ($_rpl_topology == 'none')
|
||||||
|
{
|
||||||
|
--let $_rpl_topology=
|
||||||
|
}
|
||||||
|
if ($rpl_master_list == '')
|
||||||
|
{
|
||||||
|
--die You must source include/rpl_init.inc before you source include/rpl_change_topology.inc
|
||||||
|
}
|
||||||
|
--let $_rpl_old_master_list= $rpl_master_list
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo \$rpl_server_count='$rpl_server_count'
|
||||||
|
--echo \$rpl_server_count_length='$rpl_server_count_length'
|
||||||
|
--echo new \$rpl_topology='$_rpl_topology'
|
||||||
|
--echo old \$rpl_master_list='$rpl_master_list'
|
||||||
|
--echo old \$rpl_sync_chain='$rpl_sync_chain'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo ---- Generate \$rpl_server_count_length and \$rpl_master_list ----
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $rpl_server_count_length= `SELECT LENGTH('$rpl_server_count')`
|
||||||
|
--let $rpl_master_list=
|
||||||
|
--let $_rpl_no_server= `SELECT REPEAT(' ', $rpl_server_count_length)`
|
||||||
|
--let $rpl_master_list= `SELECT REPEAT('$_rpl_no_server', $rpl_server_count)`
|
||||||
|
while ($_rpl_topology)
|
||||||
|
{
|
||||||
|
# Get 's1->s2' from 's1->s2->s3->...' or from 's1->s2,s3->s4,...'
|
||||||
|
--let $_rpl_master_slave= `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX('$_rpl_topology', ',', 1), '->', 2)`
|
||||||
|
# Modify $_rpl_topology as follows:
|
||||||
|
# - If it starts with 's1->s2,', remove 's1->s2,'
|
||||||
|
# - If it starts with 's1->s2->', remove 's1->'
|
||||||
|
# - If it is equal to 's1->s2', remove 's1->s2'
|
||||||
|
--let $_rpl_topology= `SELECT SUBSTR('$_rpl_topology', IF(SUBSTR('$_rpl_topology', LENGTH('$_rpl_master_slave') + 1, 2) != '->', LENGTH('$_rpl_master_slave'), LOCATE('->', '$_rpl_master_slave')) + 2)`
|
||||||
|
# Get 's1' from 's1->s2'
|
||||||
|
--let $_rpl_master= `SELECT SUBSTRING_INDEX('$_rpl_master_slave', '->', 1)`
|
||||||
|
# Get 's2' from 's1->s2'
|
||||||
|
--let $_rpl_slave= `SELECT SUBSTRING('$_rpl_master_slave', LENGTH('$_rpl_master') + 3)`
|
||||||
|
# Check that s2 does not have another master.
|
||||||
|
if (`SELECT SUBSTR('$rpl_master_list', 1 + ($_rpl_slave - 1) * $rpl_server_count_length, $rpl_server_count_length) != '$_rpl_no_server'`)
|
||||||
|
{
|
||||||
|
--echo ERROR IN TEST: Server '$_rpl_slave' has more than one master in topology '$rpl_topology'
|
||||||
|
--die ERROR IN TEST: found a server with more than one master in the $rpl_topology variable
|
||||||
|
}
|
||||||
|
# Save 's1' at position 's2' in $rpl_master_list
|
||||||
|
--let $rpl_master_list= `SELECT INSERT('$rpl_master_list', 1 + ($_rpl_slave - 1) * $rpl_server_count_length, $rpl_server_count_length, RPAD('$_rpl_master', $rpl_server_count_length, ' '))`
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo new \$rpl_server_count_length = '$rpl_server_count_length'
|
||||||
|
--echo new \$rpl_master_list = '$rpl_master_list'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$rpl_skip_change_master)
|
||||||
|
{
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo ---- Execute CHANGE MASTER on all servers ----
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$rpl_debug)
|
||||||
|
{
|
||||||
|
--disable_query_log
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_rpl_server= $rpl_server_count
|
||||||
|
while ($_rpl_server)
|
||||||
|
{
|
||||||
|
# The following statement evaluates to:
|
||||||
|
# 0, if server_$_rpl_server has the same master as before.
|
||||||
|
# The master's server, if server_$_rpl_server is a slave.
|
||||||
|
# The empty string, if server_$_rpl_server is not a slave.
|
||||||
|
--let $_rpl_master= `SELECT TRIM(IFNULL(NULLIF(SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length), SUBSTRING('$_rpl_old_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length)), 0))`
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo \$_rpl_server='$_rpl_server' \$_rpl_master='$_rpl_master'
|
||||||
|
}
|
||||||
|
if ($_rpl_master)
|
||||||
|
{
|
||||||
|
# Get port number
|
||||||
|
--let $_rpl_port= \$SERVER_MYPORT_$_rpl_master
|
||||||
|
# Get MASTER_LOG_FILE
|
||||||
|
--let $_rpl_master_log_file_index= `SELECT LOCATE('$_rpl_server:', '$rpl_master_log_file')`
|
||||||
|
if ($_rpl_master_log_file_index)
|
||||||
|
{
|
||||||
|
# Get text from after ':' and before ',', starting at
|
||||||
|
# $_rpl_master_log_file
|
||||||
|
--let $_rpl_master_log_file= `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING('$rpl_master_log_file', $_rpl_master_log_file_index), ',', 1), ':', -1)`
|
||||||
|
}
|
||||||
|
if (!$_rpl_master_log_file_index)
|
||||||
|
{
|
||||||
|
--let $rpl_connection_name= server_$_rpl_master
|
||||||
|
--source include/rpl_connection.inc
|
||||||
|
--let $_rpl_master_log_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
|
}
|
||||||
|
# Change connection.
|
||||||
|
--let $rpl_connection_name= server_$_rpl_server
|
||||||
|
--source include/rpl_connection.inc
|
||||||
|
# Get MASTER_LOG_POS
|
||||||
|
--let $_rpl_master_log_pos_index= `SELECT LOCATE('$_rpl_server:', '$rpl_master_log_pos')`
|
||||||
|
if ($_rpl_master_log_pos_index)
|
||||||
|
{
|
||||||
|
--let $_rpl_master_log_pos= `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING('$rpl_master_log_pos', $_rpl_master_log_pos_index), ',', 1), ':', -1)`
|
||||||
|
--let $_rpl_master_log_pos= , MASTER_LOG_POS = $_rpl_master_log_pos
|
||||||
|
}
|
||||||
|
if (!$_rpl_master_log_pos_index)
|
||||||
|
{
|
||||||
|
--let $_rpl_master_log_pos=
|
||||||
|
}
|
||||||
|
eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1;
|
||||||
|
}
|
||||||
|
if ($_rpl_master == '')
|
||||||
|
{
|
||||||
|
# This un-configures the server so that it's not a slave.
|
||||||
|
# After BUG#28796, such configuration is not possible any more.
|
||||||
|
#--let $rpl_connection_name= server_$_rpl_server
|
||||||
|
#--source include/rpl_connection.inc
|
||||||
|
#CHANGE MASTER TO MASTER_HOST = '';
|
||||||
|
}
|
||||||
|
--dec $_rpl_server
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
--let $rpl_sync_chain_dirty= 1
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= rpl_change_topology.inc
|
||||||
|
--source include/end_include_file.inc
|
58
mysql-test/include/rpl_connect.inc
Normal file
58
mysql-test/include/rpl_connect.inc
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Create a connection to a given numbered server.
|
||||||
|
#
|
||||||
|
# This script is normally used internally by rpl_init.inc and
|
||||||
|
# master-slave.inc, but it can also be used in test cases that need to
|
||||||
|
# create more connections or re-create connections after disconnect.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --let $rpl_connection_name= <connection_name>
|
||||||
|
# --let $rpl_server_number= <server_number>
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/rpl_connect.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $rpl_connection_name
|
||||||
|
# The name of the connection to create.
|
||||||
|
#
|
||||||
|
# $rpl_server_number
|
||||||
|
# The number of the server to connect to.
|
||||||
|
#
|
||||||
|
# $rpl_debug
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= rpl_connect.inc [creating $rpl_connection_name]
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
|
if (!$rpl_server_number)
|
||||||
|
{
|
||||||
|
--die ERROR IN TEST: You must set $rpl_server_number before sourcing include/rpl_connect.inc
|
||||||
|
}
|
||||||
|
if (!$rpl_connection_name)
|
||||||
|
{
|
||||||
|
--die ERROR IN TEST: You must set $rpl_connection_name before sourcing include/rpl_connect.inc
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get port number
|
||||||
|
--let $_rpl_port= \$SERVER_MYPORT_$rpl_server_number
|
||||||
|
if (!$_rpl_port)
|
||||||
|
{
|
||||||
|
--echo Bug in test case: '\$SERVER_MYPORT_$rpl_server_number' not initialized. Check the test's .cfg file.
|
||||||
|
--die Not all SERVER_MYPORT_* environment variables are setup correctly.
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create connection.
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo connect ($rpl_connection_name,127.0.0.1,root,,test,$_rpl_port,)
|
||||||
|
}
|
||||||
|
--connect ($rpl_connection_name,127.0.0.1,root,,test,$_rpl_port,)
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= rpl_connect.inc
|
||||||
|
--source include/end_include_file.inc
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user